0

When I run my website,sometimes run without error and some times this exception accord. what's problem?

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using 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.

KV Prajapati
  • 93,659
  • 19
  • 148
  • 186
Mohamad Kiani
  • 15
  • 1
  • 6
  • Please see this answer: http://stackoverflow.com/a/1503660/290343 – Ofer Zelig Jan 25 '12 at 11:12
  • I can't understand exactly how handle this exception. I need some explain more – Mohamad Kiani Jan 25 '12 at 11:19
  • There can be various reasons, please read the answers thoroughly, including Microsoft's documentation about [EnableEventValdidation](http://msdn.microsoft.com/en-us/library/system.web.configuration.pagessection.enableeventvalidation.aspx). Depending on your security needs, as a last resort (but only a last resort), set it to 'false' in web.config or on a per-page basis. – Ofer Zelig Jan 25 '12 at 11:23
  • this document hasn't a sample , and I can't understand – Mohamad Kiani Jan 25 '12 at 11:32
  • should I add in web.config? where of web.config should I put this? – Mohamad Kiani Jan 25 '12 at 13:13

1 Answers1

0

Please see this answer: https://stackoverflow.com/a/1503660/290343.

Also read Microsoft's documentation about EnableEventValidation. Depending on your security needs, as a last resort (but only a last resort), set it to 'false' in web.config or on a per-page basis.

Community
  • 1
  • 1
Ofer Zelig
  • 17,068
  • 9
  • 59
  • 93