System.FormatException: 'Input string was not in a correct format.'

Hi,

I am posting following query to server, where it throws error like- System.FormatException: ‘Input string was not in a correct format.’ Actually this query is to search all records which contains XXX (cross column search).

https://ams-device-int.azurewebsites.net/NetworkIPAddress//OrFilter?skip=0&take=10&ClientNameContains=11.11&CreatedByContains=11.11&DescriptionContains=11.11&DomainNameContains=11.11&FullyQualifiedDomainNameContains=11.11&HostNameContains=11.11&IPAddressContains=11.11&IdContains=11.11&MACAddressContains=11.11&NetworkIPAddressUseNameContains=11.11&UpdatedByContains=11.11&VLANNameContains=11.11&VLANNumberContains=11.11

Basically, the column which contains this kind of data is of type varchar in SQL (column-IPAddress), which can be anything like- 1.2.3.4 or 128.156.255.48 or 41.75.26.23
Surprisingly, above search works fine with query which contains more than decimal value, e.g.(.11.11.)-
https://ams-device-int.azurewebsites.net/NetworkIPAddress//OrFilter?skip=0&take=10&ClientNameContains=.11.11&CreatedByContains=.11.11&DescriptionContains=.11.11&DomainNameContains=.11.11&FullyQualifiedDomainNameContains=.11.11&HostNameContains=.11.11&IPAddressContains=.11.11&IdContains=.11.11&MACAddressContains=.11.11&NetworkIPAddressUseNameContains=.11.11&UpdatedByContains=.11.11&VLANNameContains=.11.11&VLANNumberContains=.11.11

Since this exception is getting generated on above line of code, I am not able to diagnose the issue-
AutoQuery.CreateQuery(req, Request.GetRequestParams());

Can you help me to figure out root cause of the issue and solution to overcome this ?

Thanks in Advance,

You can’t use a like/contains search on a number field and any number field requires a leading ‘0’ before the decimal point