Input string was not in a correct format Exception

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
9/15/2012 9:01:59 AM
Gravatar
Total Posts 68

Input string was not in a correct format Exception

Hi Joe,

Seeing the below exception thrown when accessing a site using a Win 8 RTM / IE10 client. Have also seen it using 08R2 but far less frequently.

2012-09-15 06:25:41,927 ERROR - /FormWizard/FormEdit.aspx?mid=116&pageid=54 - mojoPortal.Web.mojoBasePage - /FormWizard/FormEdit.aspx?mid=116&pageid=54
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 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)

The exception surfaces in several administrative areas but is very common in the Pro add-ins. Here is a solid repro that has been reproduced on the demo site: 1) Visit a page with Form Wizard Pro using IE 10, 2) Edit the form, 3) Clicking the pencil icon on a question will cause the exception.

Note when IE10 is in compatibility mode the exception does not occur but the layout is not as expected.

The environment is MP 2.3.9.0 / MSSQL 2008R2 / .NET 4.0 Full Trust. Client: Windows 8 RTM / IE 10

 

9/15/2012 9:45:26 AM
Gravatar
Total Posts 18439

Re: Input string was not in a correct format Exception

Hi Bill,

This error is only pointing to .net framework code not to actual code in Form Wizard or mojoPortal.

I don't currently have any Win 8 machines or access to IE 10 but I do not think it is a bug in mojoPortal or in Form Wizard application code, the error points to deeper stuff in the framework not to my code, so it seems like a bug that is an issue with IE 10 and .NET 4 compatibility.

A quick google of IE 10 and the error stack trace finds this article which says a workaround is to install .NET 4.5 on your server. There is also a thread about this error on asp.net forums. .NET 4.5 is a superset of .NET 4 so you can safely run the mojoPortal .NET 4 package under .NET 4.5 as I understand it.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.