I am using NopCommerce 2.65 and all of a sudden when adding new products to my store I am getting an application error. I tried a couple of products and the error happened every time. It has been a few weeks since I added any products, but this did not happen before. Here is a copy of the error that I received on the last product I was trying to add... 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: 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.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46 System.Convert.ToInt32(Object value) +28 Nop.Plugin.Misc.Watermark.Filters.AddEditWatermarkFilterAttribute.OnActionExecuted(ActionExecutedContext filterContext) +849 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +287 System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +20 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +267 System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +20 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +267 System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +20 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +190 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +329 System.Web.Mvc.Controller.ExecuteCore() +115 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +94 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55 System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +31 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970061 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
The error "Input string was not in a correct format" suggests that the input in the form was not in the correct format. The error happened because System.Number.StringToNumber method could not convert a sting value into integer. This could happen because characters were entered into a field where a number was expected.
Thanks for the reply Rum, I have tried both letters and numbers. I am just trying to add a new product to the database and am getting this error. I have been adding products and updating for weeks without any issues. The only field that I was trying was the new product name field and anytime I try this I am getting the error. I had posted a message for Winhost support and they think that it could be an issue in that I am using sql server express instead of a full version of sql server. I checked the Nop site and they say that it is ok to use a sql server express db.
The error you are getting is application error seems to be unrelated to sql server. Can you please provide me with the ticket number where this issue was handled by our support department so I can take a look at it?
Hi Rum, I just wanted to see if you were able to figure anything out or make any progress on a solution on how to fix the issue. Thanks
It looks like we answered your ticket this morning. We can't find any server-related cause for the error, so you'll have to check with NopCommerce for a possible cause/fix.