.comment-link {margin-left:.6em;}

Ben Cops

Tuesday, September 08, 2009

Timezone error in ESB toolkit 2.0 - Input string was not in a correct format

Well done to Payal for working this one out.
When you look at the portal webpage on a computer set to the Indian timezone offset (5.5) rather than the UK (currently 1) you get the following error

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:

Line 19: if (!string.IsNullOrEmpty(tzoqry))
Line 20:
Line 21: Session["tzo"] =int.Parse ( tzoqry);
Line 22: if (Session["tzo"] == null)
Line 23: //need this to make it work in production

This is because the timezone is passed in the querystring you're redirected to:


And tzo=5.5 does not parse to an int. If you look at it on a UK machine you're redirected to


And it works...



Post a Comment

Links to this post:

Create a Link

<< Home