Server Error in '/' Application- Input string was no

Posted by Community Admin on 04-Aug-2018 21:26

Server Error in '/' Application- Input string was not in a correct format.

All Replies

Posted by Community Admin on 05-Jan-2012 00:00

I'm trying to upload new products to my website created through product page templates, with a new product category. But when I click to go to the "second" page, I receive the following errror. Please help:

  Server Error in '/' Application.


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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7467367
   System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +115
   System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) +192
   System.Convert.ToDouble(String value) +63
   App_UserControls_products_ProductSpecSheet.BindProductSpecSheet(Product p) +277
   App_UserControls_products_ProductSpecSheet.Page_Load(Object sender, EventArgs e) +129
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
   System.Web.UI.ControlCollection.Add(Control child) +80
   Telerik.Cms.Web.InternalPage.AddPageControls(IPageContent pageContent, Dictionary`2 placeHolders) +398
   Telerik.Cms.Web.InternalPage.CreateChildControls() +388
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Posted by Community Admin on 06-Jan-2012 00:00

Hi Amy,

Can you please send us screenshots of the exact process of getting the error ( or a video if possible ) because I could not really understand how the issue can be reproduced. If possible provide exact steps for replicating the scenario.

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 09-Jan-2012 00:00

New product category and new product setup where I received the error:
Screen shots attached.

Thank you,
Amy Miller

Posted by Community Admin on 11-Jan-2012 00:00

Hello Amy,

The problem is most likely coming from the fact that the system cannot parse a string value to double. The issue is located in the following method:

BindProductSpecSheet
Please review it and check the bindings as it tries to convert a product value to a double.

I suspect that the issue is a result of the
StringToNumber

conversion, which by digging deeply shows that is a separate assembly used for " for parsing numbers in their written form into their numeric equivalent."

You can the following page, which shows results of several articles, containing information about StringToNumber:

social.msdn.microsoft.com/.../en-us

As suggested in a forum thread:

forums.asp.net/.../1108061.aspx

please verify that you are using same culture for your web server / sql server. Also make sure you are not entering any faulty symbols in the product specs page, because the error may be result of them not being parsed correctly ( because of the StringToNumber library ).

Regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Jan-2012 00:00

THANK YOU!! Your answer allowed me to fix the problem. I had entered (oz.) when that field automatically lists (oz.) for me in the product spec pages.
Thanks again!

Posted by Community Admin on 13-Nov-2017 00:00


<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

This thread is closed