I got the error <pages enableEventValidation="true"/> in some mach

B

Billy Zhang

Deployed asp.net app on the server, I found in some client machines I got
below error: (Since it's Winxp Chinese system, the error was Chinese)

回å‘或回调å‚数无效。在é…置中使用 <pages enableEventValidation="true"/> 或在页é¢ä¸­ä½¿ç”¨ <%@ Page
EnableEventValidation="true" %>
å¯ç”¨äº†äº‹ä»¶éªŒè¯ã€‚出于安全目的,此功能验è¯å›žå‘或回调事件的å‚数是å¦æ¥æºäºŽæœ€åˆå‘ˆçŽ°è¿™äº›äº‹ä»¶çš„æœåŠ¡å™¨æŽ§ä»¶ã€‚如果数æ®æœ‰æ•ˆå¹¶ä¸”是预期的,则使用
ClientScriptManager.RegisterForEventValidation 方法æ¥æ³¨å†Œå›žå‘或回调数æ®ä»¥è¿›è¡ŒéªŒè¯ã€‚
 
C

comphilip

It seems that the data post back is not valid.

I met this situation before, I post back or request the page, asp.net check
the value of ViewState of request. If the value is not valid(format valid or
unknown source), it throws this error.
 
S

Steven Cheng

Hi Billy,

As for the "<pages enableEventValidation="true"/> ...." error you
encountered, based on my experience, here are some possible causes:

** Have you use "Response.Write" or some other API to dynamically add some
html markup (that contains some html input elements such as <input
type='text' .../>) into the page?

** Have you use any client-side script that will add some html markup
containing some input elements.

Whenever you add some html input elements(which will cause postback or post
data) withtou using the server-side Control collection model, the ASP.NET
event validation or data validation will detect such data/events as invalid
postback.

Is this error occuring on a particular page and can be definitely repro, we
can try check all those potential page markup modification or
client-scripts on it to see whether any of them will violate the above
rules.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <[email protected]>
Subject: I got the error <pages enableEventValidation="true"/> in some mach
Date: Mon, 5 Jan 2009 01:51:01 -0800
Deployed asp.net app on the server, I found in some client machines I got
below error: (Since it's Winxp Chinese system, the error was Chinese)

回å‘或回调å‚数无效。在é…置中使ç”?<pages
enableEventValidation="true"/> 或在页é¢ä¸­ä½¿ç”?<%@ Page
 
S

Steven Cheng

Hi Billy,

Here are two blog articles which explains the "ASP.NET 2.0 event
validation" and some possible causes:

#ASP.NET Event Validation and “Invalid Callback Or Postback Argument?: Part
I
http://odetocode.com/Blogs/scott/archive/2006/03/20/3145.aspx

#ASP.NET Event Validation and “Invalid Callback Or Postback Argument?: Part
II
http://odetocode.com/blogs/scott/archive/2006/03/21/3153.aspx

You can also try checking the page based on the information in those
articles.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).


--------------------
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <[email protected]>
Subject: I got the error <pages enableEventValidation="true"/> in some mach
Date: Mon, 5 Jan 2009 01:51:01 -0800
Deployed asp.net app on the server, I found in some client machines I got
below error: (Since it's Winxp Chinese system, the error was Chinese)

回å‘或回调å‚数无效。在é…置中使ç”?<pages
enableEventValidation="true"/> 或在页é¢ä¸­ä½¿ç”?<%@ Page
 
S

Steven Cheng

Hi Billy,

Have you got any progress on this issue?

If there is anything else need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

--------------------
Thread-Topic: I got the error <pages enableEventValidation="true"/> in some mach
thread-index: AclvGx4LN4GU2ZUnR3etZsJkoCzFPQ==
X-WBNR-Posting-Host: 65.55.12.11
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <[email protected]>
Subject: I got the error <pages enableEventValidation="true"/> in some mach
Date: Mon, 5 Jan 2009 01:51:01 -0800
Deployed asp.net app on the server, I found in some client machines I got
below error: (Since it's Winxp Chinese system, the error was Chinese)

回å‘或回调å‚数无效。在é…置中使ç”?<pages
enableEventValidation="true"/> 或在页é¢ä¸­ä½¿ç”?<%@ Page
 
B

Billy Zhang

I have resolved the problem.
I found in the error page, it loaded a activex object, in the problem
machine, this activex control was not registered, then the page loaded vary
slowly.
i click the button to submit and got this error.
But in other machine, even the activex control was not registered, the page
loaded very quickly.
 
S

Steven Cheng

Thanks for your reply Billy,

I think what you mentioned(that the ActiveX control cause page load very
slow) is a very important clues. And the following article should clearly
explained the invalid postback problem you encountered:

#Event Validation Errors and Network Congestion in ASP.NET
http://odetocode.com/Blogs/scott/archive/2007/04/13/10696.aspx

when the page load slow, it is possibly that you submit the page before the
event validation's <input hidden> field get loaded. Then, the postback
request doesn't contain the necessary event validation data which result to
the exception.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.



--------------------
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <[email protected]>
References: <[email protected]>
 

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

Top