VERIFIED SOLUTION i

Resolve Admin Service error "Input string was not in a correct format" in Officemail

Issue

Officemail Admin Service error: Input string was not in a correct format.

When trying to run the P/I OfficeMail service, it ends up with the following error:

2017-02-02 17:21:53.7612 1 ERROR PIOfficeMailAdminServices.PIOfficeMailAdminServices System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at PIOfficeMailLibrary.Common.AdminServiceConfiguration.get_CheckEverySeconds() in d:\BuildSystem\3.9.0.12\Code\Source\Server\PIOfficeMailLibrary\Common\AdminServiceConfiguration.cs:line 65 at PIOfficeMailAdminServices.PIOfficeMailAdminServices..ctor() in d:\BuildSystem\3.9.0.12\Code\Source\Server\PIOfficeMailAdminServices\PIOfficeMailAdminServices\PIOfficeMailAdminServices.cs:line 93 EXCEPTION OCCURRED:Input string was not in a correct format. FormatException Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean) at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at PIOfficeMailLibrary.Common.AdminServiceConfiguration.get_CheckEverySeconds() in d:\BuildSystem\3.9.0.12\Code\Source\Server\PIOfficeMailLibrary\Common\AdminServiceConfiguration.cs:line 65 at PIOfficeMailAdminServices.PIOfficeMailAdminServices..ctor() in d:\BuildSystem\3.9.0.12\Code\Source\Server\PIOfficeMailAdminServices\PIOfficeMailAdminServices\PIOfficeMailAdminServices.cs:line 93

Cause

Incorrect key value for admin service config file:

<add key="ThisServer" value="<IP_address>"/>


 

Resolution

UPDATED: June 28, 2017
Based on PB testing, the key:
<add key="ThisServer" value="<IP_address>"/>
needs to be changed.

When it is changed to the hostname instead of IP, the service could be started with no error. Also ThisServer value should be the same as Servername value in:
[PIOfficeMail].[dbo].[Server] table at SQL admin server
Environment Details