when I use the recently updated Microsoft Edge, it has the following problem. It does not have it when I use other browsers like IE, Chrome, etc or previous versions of Microsoft Edge.
When I click an image button, it shows the error message of "Input string was not in a correct format"
and the Stack Trace is below:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7488663
System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +115
System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) +192
System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +189
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +14
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +690
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743
Please help and advise what the problem is
It would seem that in your click event, you try to set some value from the page to a Double variable, but the original string is not a valid number format. The differences in browsers might be caused by the browsers use different locale settings (different locales might use . or , as decimal separator, or also thousands separators might come into play if number is large enough).
To give more help, we would need more details from your code related to the button (edit your question to provide more info).
Related
I have the same problem with a new system and it is a very old bug.
Registration fail.
https://github.com/2sic/app-events-and-courses/issues/1
I am looking for a workaround.
Thanks Thomas
I tried three diffrent systems but no success.
var course = AsDynamic(App.Data["Course"].List[Convert.ToInt32(Request.QueryString["cid"])]);
Error: System.Web.HttpCompileException (0x80004005):
d:\home\site\wwwroot\Portals\43\2sxc\Courses_Course-Registration.cshtml(12):
error CS0021: Cannot apply indexing with [] to an expression of type
'System.Collections.Generic.IEnumerable'
at
System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult
result, Boolean keyFromVPP, VirtualPath virtualPath) at
System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String
cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode,
Boolean ensureIsUpToDate) at
I assume this is some very old code - because the List object changed in 2017. So first of all let's get you going:
Read this blog - it tells you what changed and how to fix it: https://2sxc.org/en/blog/post/fixing-the-breaking-change-in-2sxc-9-8-list-instead-of-dictionary
Since you installed a new system (that's what I understand), could you point me to where you got the code - so I can have the original fixed?
I am facing this weird error in a live Sitecore instance.
It is multi-language, english and french. It has over a thousand content items.
With two items(that is what we found so far) I am having this problem.
I am able to open the item in its english version but when I try to switch language to french nothing happens. If I select any other item, switch to French, and then try to open this problematic item, Content Editor breaks and stop responding.
This error is being logged in Sitecore`s log:
4236 12:00:36 INFO HttpModule is being initialized
4236 12:00:36 ERROR Could not decrypt value85953F0F(...trimmed...)B2A
Exception: System.Web.HttpException
Message: Unable to validate data.
Source: System.Web
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
at System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket)
at Sitecore.Security.Authentication.AuthenticationHelper.GetSavedUser(String cookieName)
Does anybody have a suggestion of what is happening or what I might try to solve it?
Using Fiddler, I also saw that the POST and RESPONSE are ok, like any other language switch on items.
Also tried to use "Raw Values", and it still breaking my content editor.
Really appreciate any help, tks
The reason Content Editor was breaking was a weird character was input in a Multi-Line text field.
Probably copied from a word document.
I'm having a problem with an UpdatePanel. When a user clicks a button inside the panel, I get an async PostBack and a set of jQuery tabs is reinitialized. If (after the successful first async postback) I try to use a button or other control outside the UpdatePanel, I get the following error:
An error has occured on page: http://server/details.aspx for user: at IP: 192.168.0.92
The state information is invalid for this page and might be corrupted. at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.details_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Invalid viewstate.
Client IP: 192.168.0.92
Port: 1707
Referer: http://server/details.aspx
Path: /server/details.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322)
ViewState: /wEPDwULLTEwMTkxMjEwNTNkZBSW/poBumnzl2Hp6YECMfZitwnKh80rC7JEaLc28HAh,z02m+uZDqc2t7iURUsMo+CuP5x4r/SPERT297Zo+E1XXWjvhDLPLpwJMqHic8o0GS89zNWWT5HUTr8DkPJgRKqGADUP0cXLYZ+seXS2JdxB85T6LsnrZwgBZC8hKDZPFlQtPIc9U0d5WCRQJFXRIHr3YLlQmTdXqcZBd09TrgA3y+hxpMJ4pq4kFU7wA9sZ0P+YFOzCNtIadsoXxZGzz+PjePHLPu+mwBAgLdI4mXYtA5MdgrH6OaM3eZaS9dZC5vpHWdC3b+ni3SkytO1FLhR4IUCNKIh+ApVtVNbfMkYAAAiXqSJKitUpZrqb3VM/EGsoZAK63iVAIpIBWkT/TeNU49UfofDChcMdsL/MLX2LEAMPG1BLhmcxIVPWJzGdCldPk5FDie6m2Wm5SRah3oMpcltVUv0wjGOo04TLOmrb/vw5iXyXAPC0eHch60Bm2gGCxY/PKTa9A/mWIyXwnVT2Ma0mi6i9gkvsDyWVN/u/ckNQrM4yN31y1vFwXG3jP+2euwDcZ41eK4md7FM6tBFZOvR7RV2mSI4BvJliLihfcje9IEEv9/X1zuz73RZrEYKVuCN/gFJNwRDJgYia2sCo1oE3NQn5guMFk+YSg9xzMgEQ0SmejhqnfughBrnbzhFWNXbCHz/hTkeBFYRRx/k3uTDpffW4qsVTL+VyZr3b8QKLZELNCrx2wqVSpup0/Mux65WDJykvcMbOq+...
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. at System.Convert.FromBase64String(String s)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
I'm not really sure how to go about troubleshooting this, everything else inside the updatepanel on different tabs seems to work.
it could happen for few reasons.
Foremost is that your Ajax controls on refresh is creating its own viewstate which replaces main page viewstate.
There are some solutions I read on other forums like adding
Response.End
after the Ajax output. You may need to handle ThreadAbortException when you use Response.End
Second suggested way by another user is taking off Runat from Ajax form element.
It can also happen when the Ajax postback url is going to a separate page to grab the data. If that is the case you might want to change the url to the same page.
maybe you creating on the fly new controls which has a form which has a viewstate and thats why ...?
I'm running an ASP.NET project on IIS locally, and an exception is getting reported back to the web browser after a postback has been handled.
In VS2010, if I look at Debug->Exceptions..., every exception type is checked to break when thrown.
Here's the exception I'm seeing in my browser popup:
Line: 868
Error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.
Here's the response back to the browser I got from Fiddler:
41|error|500|Input string was not in a correct format.|
Of course I googled, and most posts say that attempting to parse a string to an int can cause this. I don't think I'm doing anything like that.
======Edit=======
Removed updatepanel, and now I get:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12630469
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +224
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +483
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
=================
thanks,
Mark
Problem was that for a button I had in my grid, I was setting the CommandArgument, which I should not be doing. This is used by the GridView to get the row index in case it doesn't have the actual row owning the button.
The exception is happening before your code is even invoked. Maybe this? Sys.WebForms.PageRequestManagerServerErrorException 12031
I don't know about breaking your debugger. By default, this type of error won't break your code. You should have a proper try{}catch{} statement setup for the code that handles your data manipulation. You could even have some debug variables that you could output in your catch{} to help you locate your error if your dealing with lots of data. Run your debugger and iterate through it to find the error.
I always got this error guys on my site.Anybody got a solution.
Stacktrace
at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at System.Web.UI.Page.DecryptString(String s) at System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString) at System.Web.Handlers.ScriptResourceHandler.ProcessRequestInternal(HttpResponse response, NameValueCollection queryString, VirtualFileReader fileReader) at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context) at System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Query String
d=J_c3w3Q59U-PnoRlWBPOJMVgHe_9Ile9wANEXiRFLzG8mequestManager._initialize('ctl00%24ScriptManager1'
I noticed that there are strings that got appended on the last part of ScriptResource.axd which are not part of the querystring(equestManager._initialize('ctl00%24ScriptManager1').I don't know how this string ends up here.I am using MS ajax, webforms and IIS7 on a shared hosting plan.
This is a bug caused by IE8 users, you can read about it here: http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx
The basics are that when IE8 processes the page, it sometimes just leaves 4kb out of it, and if your <script src="ScriptResource.axd?.... started and gets truncated, when the page is rejoined with 4k missing, up until the matching quote to close the src="" is used, resulting in a very strange request to your server.
Update: It's been fixed now with KB980182 (4/1/2010)