we are having a problem with a .NET 4.0 Web Application in IE10 (Desktop and Metro). When we click an image button the following exception is logged on the server.
We already deployed KB2600088 which made some controls usable but not the image buttons. Did anyone came across this problem and has a solution to offer.
Thank you
Sascha
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/12/2012 11:39:51 AM
Event time (UTC): 7/12/2012 9:39:51 AM
Event ID: 32ff5c5cf4ec4c718957754b96839917
Event sequence: 15
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT-1-129865595880582209
Trust level: Full
Application Virtual Path: /
Application Path: C:\WebSites\CWA\
Machine name: XYZ
Process information:
Process ID: 5324
Process name: w3wp.exe
Account name: CSG\CSG-CWA-wa
Exception information:
Exception type: FormatException
Exception message: 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 System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: http://www.CWA-registry.com/CFR/default.aspx
Request path: /CFR/default.aspx
User host address: 192.168.40.254
User: test
Is authenticated: True
Authentication Type: Forms
Thread account name: CSG\CSG-CWA-wa
Thread information:
Thread ID: 5
Thread account name: CSG\CSG-CWA-wa
Is impersonating: False
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.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Hello, the application is working fine in IE9 and a bunch of other browsers. Only on IE10 where this problem occurs. When you look at the stack trace the exception is happening in in the LoadPostData method of the ImageButton control and no custom code.
and this is ASP.NET code for one of the affected buttons:
<asp:ImageButtonID="btnOK"ImageUrl="~/images/met_ok.png"runat="server"class="mb"
OnClick="btnOK_Click"CausesValidation="False"/>
I have an ASP.NET site running on a Windows 2008 R2 server and I still get the "Input string was not in a correct format."
If I run and debug the same site locally (http://localhost/) my Windows 8 RTM system I do not have the issue.
I have discovered that when I experience the issue on my hosted site, if I turn IE10 compatibility mode on I do not get the error.
Also, if I change the ImageButtons to LinkButtons I do not get the error. It only occurs with ImageButtons.
Hi, you are right. Yesterday afternoon we discovered this as well. There are situation where it works now but hasn't before and some situation where it still doesn't.
It seems to work fine for ne ASP.NET 4.5 applications but not for ASP.NET 4.0.
All the link buttons or "regular buttons" work fine, just the image buttons are causing this problem.
sstops
0 Points
7 Posts
ImageButtons not working in IE10
Jul 12, 2012 09:59 AM|LINK
Hello,
we are having a problem with a .NET 4.0 Web Application in IE10 (Desktop and Metro). When we click an image button the following exception is logged on the server.
We already deployed KB2600088 which made some controls usable but not the image buttons. Did anyone came across this problem and has a solution to offer.
Thank you
Sascha
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 7/12/2012 11:39:51 AM Event time (UTC): 7/12/2012 9:39:51 AM Event ID: 32ff5c5cf4ec4c718957754b96839917 Event sequence: 15 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/3/ROOT-1-129865595880582209 Trust level: Full Application Virtual Path: / Application Path: C:\WebSites\CWA\ Machine name: XYZ Process information: Process ID: 5324 Process name: w3wp.exe Account name: CSG\CSG-CWA-wa Exception information: Exception type: FormatException Exception message: 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 System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Request information: Request URL: http://www.CWA-registry.com/CFR/default.aspx Request path: /CFR/default.aspx User host address: 192.168.40.254 User: test Is authenticated: True Authentication Type: Forms Thread account name: CSG\CSG-CWA-wa Thread information: Thread ID: 5 Thread account name: CSG\CSG-CWA-wa Is impersonating: False 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.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: ImageButtons not working in IE10
Jul 12, 2012 10:57 AM|LINK
i believe that this is absolutely not an .net4 or IE 10 issue its a error in code
in the code somewhere you are trying to convert to integer but some how that value is not a integer value so thats the error
sstops
0 Points
7 Posts
Re: ImageButtons not working in IE10
Jul 12, 2012 12:03 PM|LINK
Hello, the application is working fine in IE9 and a bunch of other browsers. Only on IE10 where this problem occurs. When you look at the stack trace the exception is happening in in the LoadPostData method of the ImageButton control and no custom code.
and this is ASP.NET code for one of the affected buttons:
<asp:ImageButton ID="btnOK" ImageUrl="~/images/met_ok.png" runat="server" class="mb" OnClick="btnOK_Click" CausesValidation="False" />
Sage Gu - MS...
Contributor
6693 Points
578 Posts
Microsoft
Re: ImageButtons not working in IE10
Jul 19, 2012 06:31 AM|LINK
Hi sstops,
ImageButton is a server control. Based on my experience, unless it renders some html that is incompatible with IE 10, it should work fine.
Regards,
Sage Gu - MSFT
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
datasolution...
Member
2 Points
1 Post
Re: ImageButtons not working in IE10
Jul 20, 2012 01:31 PM|LINK
I'm seeing exactly the same behaviour as the OP. Image buttons on a production website produce the following (when clicked in IE10):
Input string was not in a correct format.
stack: 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.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
IE7-9 work fine. IE10 works in IE9 compatibility.
sstops
0 Points
7 Posts
Re: ImageButtons not working in IE10
Jul 31, 2012 07:48 PM|LINK
It seems this is indeed a wider spread problem:
http://connect.microsoft.com/VisualStudio/feedback/details/755419/asp-net-4-0-and-ie10-click-on-imagebutton-in-updatepanel-produces-error-click-on-normal-button-does-not
sstops
0 Points
7 Posts
Re: ImageButtons not working in IE10
Aug 16, 2012 10:42 AM|LINK
Hello,
after first tests this issue seems to be resolved in Windows 8 RTM.
Regards
Sascha
jmetcalf
Member
6 Points
3 Posts
Re: ImageButtons not working in IE10
Aug 22, 2012 05:00 PM|LINK
I am still seeing the issue from Windows 8 RTM.
I have an ASP.NET site running on a Windows 2008 R2 server and I still get the "Input string was not in a correct format."
If I run and debug the same site locally (http://localhost/) my Windows 8 RTM system I do not have the issue.
I have discovered that when I experience the issue on my hosted site, if I turn IE10 compatibility mode on I do not get the error. Also, if I change the ImageButtons to LinkButtons I do not get the error. It only occurs with ImageButtons.
sstops
0 Points
7 Posts
Re: ImageButtons not working in IE10
Aug 22, 2012 05:05 PM|LINK
Hi, you are right. Yesterday afternoon we discovered this as well. There are situation where it works now but hasn't before and some situation where it still doesn't.
It seems to work fine for ne ASP.NET 4.5 applications but not for ASP.NET 4.0.
All the link buttons or "regular buttons" work fine, just the image buttons are causing this problem.
jmetcalf
Member
6 Points
3 Posts
Re: ImageButtons not working in IE10
Aug 22, 2012 08:22 PM|LINK
You are correct, I can confirm that installing .NET 4.5 on our Windows 2008 R2 server did resolve the problem.