+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Server Error in '/' Application- Input string was not in a correct format.

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

5 posts, 0 answered
  1. Amy
    Amy avatar
    3 posts
    Registered:
    05 Jan 2012
    05 Jan 2012
    Link to this post
    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
    

  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    06 Jan 2012
    Link to this post
    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
  3. Amy
    Amy avatar
    3 posts
    Registered:
    05 Jan 2012
    09 Jan 2012
    Link to this post
    New product category and new product setup where I received the error:
    Screen shots attached.

    Thank you,
    Amy Miller
  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    11 Jan 2012
    Link to this post
    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:

    http://social.msdn.microsoft.com/search/en-us?query=StringToNumber&x=0&y=0


    As suggested in a forum thread:

    http://forums.asp.net/t/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
  5. Amy
    Amy avatar
    3 posts
    Registered:
    05 Jan 2012
    11 Jan 2012
    Link to this post
    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!
5 posts, 0 answered