Avatar of cp30
cp30
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

Intermittent error "Input string was not in a correct format."

Hi,

We've started getting strange errors from within a radwindow in our application that has been running fine for months.

The code has not changed recently.  The error seems to be produced very intermittently, but happens when a users clicks on a button within the radwindow - I've added logging and try catch blocks within every procedure/function in the page that is loaded in the radwindow. The code for the button click event is never fired when the error is prodced, instead the following error is thrown and logged by global.asax.  Do you have any idea what may be causing this?

Error Caught in Application_Error event
Error in: http://mywebsite.co.uk/filter.aspx?SiteID=325413&t=635530314166978027&altIconPath=&sliderSkin=Outlook&filterbg=&bookieList=&List=&List2=&List3=&rwndrnd=0.46842012647539377
Error Message:Input string was not in a correct format.
Stack Trace:   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 System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
Target Site:Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)

This is extremely intermittent, I've never actually manged to reproduce it myself so I'm relying on user feedback and logs.  So, to recap, it seems that as soon as they click on the button (normal asp button) they see the error and I can see from the logs that the handler code for the button click did not seem to run as it should log an event as soon as they click.

The logs do seem to show that when it happens to one user they can retry several times and it keeps erroring for them, but they will be able to use without error, presumably when they refresh the whole page.

I've tried everything I can think of.  Adding logs everywhere, changing buttons from Telerik RadButtons to regular radbuttons, moving to another web server, upgrading from .net 3.5 to 4.5, still the errors come.

Let me know if you need any more information.

Many thanks in advance

cp
.NET ProgrammingASP.NETVisual Basic.NET

Avatar of undefined
Last Comment
cp30

8/22/2022 - Mon