eventvalidation

ASP.NET EventValidation fails when .NET 4.5 Framework is installed in only one server behind the load balancer

[亡魂溺海] 提交于 2019-12-05 05:17:00
We have installed .net 4.5 Framework in one of our web servers. Our applications are targeted for .net 4.0 and run off multiple servers behind a load balancer. After the installation we get the following error message for some POST requests error_name=System.ArgumentException error_message=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

Disable EventValidation for single control, is it possible?

巧了我就是萌 提交于 2019-12-05 01:24:58
I know this is a very debated topic, and usually when you are thinking about this as a solution you might want to rethink your UI logic. I know I can pass validation using ClientScriptManager.RegisterForEventValidation. But, I'd really like to know. Is it possible to remove event validation for a single control? Is there a way work around for this? I'm modifying a DropDownList, from the client side after it's rendered. The short answer to your question is: No, there is no way to do this. You must disable EventValidation for the entire page. There are various workarounds... If you really don't

ListBox elements rearranged with JavaScript causing event validation error on postback

醉酒当歌 提交于 2019-12-04 07:20:47
I have created an item swapper control consisting in two listboxes and some buttons that allow me to swap items between the two lists. The swapping is done using javascript. I also move items up and down in the list. Basically when I move the items to the list box on the right I store the datakeys of the elements (GUIDs) in a hiddenfield. On postback I simply read the GUIDs from the field. Everything works great but on postback, I get the following exception: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in