Random Sporadic Errors - Input string was not in a correct format

Random Sporadic Errors - Input string was not in a correct format

Postby glenf » Fri 06 Jan 2017 14:24

Hi,

Devart LinqConnect version: 4.5.921.0

I'm hoping this is the right place to post this. We have an API website running using Devart LinqConnect and every few weeks / months IIS gets in a twist and starts throwing errors. Restarting the app pool solves the problem but there's no telling if / when it will reappear. The stack trace for the errors is shown below, I'm hoping you might have seen this issue before and that it's fixed in a more recent version?

Error at:System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Devart.Common.ah.v(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Common.ah.an(Byte[] A_0, Int32 A_1, Int32 A_2)
at MaterializeBroadcast(MaterializerScope )
at Devart.Data.Linq.Engine.EntityReader`3.a()
at Devart.Data.Linq.Engine.ObjectReader`1.a(T& A_0)
at Devart.Data.Linq.Engine.ObjectReader`1.c()
...

Thanks in advance!

Glen
glenf
 
Posts: 1
Joined: Fri 06 Jan 2017 13:50

Re: Random Sporadic Errors - Input string was not in a correct format

Postby Shalex » Tue 10 Jan 2017 11:04

Basing on your call stack, the scenario could be the following: your code retrieves data from some table, one of its string fields in database is mapped to the System.Double property in LinqConnect model, provider tries to cast string to System.Double but fails because data is not actually a System.Double.

If that is not a case, please try to localize the issue and send us a small complete test project with the corresponding DDL/DML script for reproducing the issue.

In case of >2MB attachment, we recommend either using some file exchange server (send us the corresponding link) or uploading a test project to our FTP server (the credentials will be provided by email request).
Shalex
Devart Team
 
Posts: 7149
Joined: Thu 14 Aug 2008 12:44


Return to LinqConnect (LINQ to SQL support)