Asp.Net 2.0 Bug

A

Amelyan

My testers getting this exception 1% of the time they click button on the
page. This happens in both IE6.0 and FireFox1.5. Any ideas?

System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.ArgumentException: Invalid
postback or callback argument. Event validation is enabled using <pages
enableEventValidation="true"/> in configuration or <%@ Page
EnableEventValidation="true" %> in a page. For security purposes, this
feature
verifies that arguments to postback or callback events originate from the
server control that originally rendered them. If the data is valid and
expected, use the ClientScriptManager.RegisterForEventValidation method
in order to register the postback or callback data for validation.
at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId,
String argument)
at System.Web.UI.Control.ValidateEvent(String uniqueID, String
eventArgument)
at System.Web.UI.WebControls.DropDownList.LoadPostData(String
postDataKey, NameValueCollection postCollection)
at
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String
postDataKey, NameValueCollection
postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData,
Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
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.designer_design_aspx.ProcessRequest(HttpContext context) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\26676eb7\92c7e946\App_Web_xzuwxjfw.18.cs:line 0
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
 
G

Guest

It's not a bug as such it's more of a result of the way ASP.net is designed.
It happens when you are using validation controls and a users initiates a
postback that causes validation before the page has finished rendering. It
is to do with the way that validation makes sure that the form being
submitted is the correct form, i think you can turn it off though but there
are security impications. I will look up more details for you.
 
B

Bruce Barker

the error mean the value posted by the browser for the dropdown, was not one
of the values rendered for the dropdown (the legal list is stored in
viewstate). one way this happens (alluded to in the error) is if
clientscript changes the dropdownlist.

-- bruce (sqlwork.com)
 
G

Guest

It is as i mentioned, also caused by submittting the form befoer the page has
finished rendering, which is often why it seems to only occur intermittantly.
 
G

Guest

Right more details ...

what i think is causing your problem as i said is users submitting the form
before the page has finished rendering. If you look in the page source you
will see a line like this

<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="vWAR/uYD2Ch7zyqe3iUJ9Ps4gQl9v0pxb9gocy9ysCsZSyhqM3p7A8SI2peXQ2H1sGC2ol7HqO7WBOgncF4Tfsada7jCpBiWABu9GXW7aT22juKw/reGyery5NTuafw7BUAYot3S3W2bWTSQ6Ir4pRdMYBznitC6S2LKrgxfgMJrJm2fxE3G3T8xMcTz2qGcjzKzZGf2KL8KrTFN47PkwNJT9o72dnrAMbZCFK84NgUuQkQde5qDktc+xXewvSvr+XgrprCSNzCnaAff4btDoLTXWY/LyK6bxkK3YbKA7RGxc80tENdIgTejDFPNGp6XWxRlKPvaKPJlBxWP/jrq923PgNdXNmztefHG/tfyTDVbWvvxABo/QBuq3Dp/FY/789/TZFrAvzLVwvZTc440t/82QhV/6iiBfrXsSyP84Fo=" />

This is what the validator uses to make sure that the the controlls being
submitted are from the correct form and it renders after all the other
controls, if your use submits the form before this has rendered, then you
will get the error you are experiencing. This is why it seems to happen
ocaisionally in testing.
 
A

Amelyan

Thank your resopnse. To me, this kind of behaviour constitutes a bug in
Asp.Net 2.0. It should never crash on user. Anyway, I will disable this
validation and wait for Asp.Net Team to come up with some sort of fix to
handle this more gracefully.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,928
Messages
2,570,068
Members
46,513
Latest member
JacklynMcC

Latest Threads

Top