FormatException: Input string was not in a correct format.

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.
11/2/2010 7:32:38 PM
Gravatar
Total Posts 5

FormatException: Input string was not in a correct format.

I get this error when running on the following hosted environment:

 

  • Mojoportal 2.3.5.5 MySQL
  • Microsoft Windows NT 5.2.3790 Service Pack 2
  • Microsoft .NET Framework Version:4.0.30319;
  • ASP.NET Version:4.0.30319.1


Input string was not in a correct format.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[FormatException: Input string was not in a correct format.]
System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) +9362001
System.String.Format(IFormatProvider provider, String format, Object[] args) +107
mojoPortal.Web.AdminUI.ModuleSettingsPage.PopulateControls() +209
mojoPortal.Web.AdminUI.ModuleSettingsPage.Page_Load(Object sender, EventArgs e) +121
System.Web.UI.Control.OnLoad(EventArgs e) +91
mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e) +12
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

When running the same code on my Windows 7 development machine, I get no error. The code is identical.

What to do?



 

11/3/2010 5:13:14 AM
Gravatar
Total Posts 5

Re: FormatException: Input string was not in a correct format.

After more indepth analysis I can now conclude that this exception occurs if my browser language preference is set to use faroese language as default browser language. (tested on IE, Chrome and Firefox). Changing the language code to English US, solves this error.

It would be fair to say that this qualifies to be a bug (Although not many users are affected). 

To reproduce this (google chrome).

  1. Open the browser options
  2. Select the "Under the hood" tab
  3. Scroll to the Web Content section and press the "Change font and language settings"
  4. Select the "Languages" tab
  5. Press the Add button on the right.
  6. Press "F" to quick select the Faroese option
  7. Restart the browser
  8. Log on to you mojoportal system
  9. Locate a blog entry and press the "Edit Feature Instance Settings" link

 


 

11/3/2010 7:13:47 AM
Gravatar
Total Posts 18439

Re: FormatException: Input string was not in a correct format.

Hi,

I tracked this down to an error in the Resource.fo.resx file for the key FeatureSettingsTabFormat it has the value Uppsetan av [0}

it needs to be Uppsetan av {0}

I will fix it.

Best,

Joe

11/3/2010 7:42:42 AM
Gravatar
Total Posts 5

Re: FormatException: Input string was not in a correct format.

Thanx!

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