PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

ASP.NET event validation

 
 
John Grandy
Guest
Posts: n/a
 
      24th May 2007
Does anyone have experience with turning off ASP.NET event validation ?
What is the complete set of consequences ?

I'm aware that event validation ensures that parameter values submitted to
event handlers for read-only ASP.NET web controls ( such as ListBox ) must
match the list of possible values available at the time the control is
rendered on the server; non-matching values will trigger a runtime
exception. Turning off event validation removes this restriction.

What are the other consequences of turning off event validation ?

<pages theme="theme" enableEventValidation="false">


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      24th May 2007
The only real consequence of disabling eventvalidation is that you are no
longer protected from rogue hackers who've hijacked your page to attempt to
post illegal formfield values that you didn't intend to be available on the
page. That's all that eventvalidation does.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"John Grandy" wrote:

> Does anyone have experience with turning off ASP.NET event validation ?
> What is the complete set of consequences ?
>
> I'm aware that event validation ensures that parameter values submitted to
> event handlers for read-only ASP.NET web controls ( such as ListBox ) must
> match the list of possible values available at the time the control is
> rendered on the server; non-matching values will trigger a runtime
> exception. Turning off event validation removes this restriction.
>
> What are the other consequences of turning off event validation ?
>
> <pages theme="theme" enableEventValidation="false">
>
>
>

 
Reply With Quote
 
John Grandy
Guest
Posts: n/a
 
      24th May 2007
I can't tell if you're taking this particular "rogue hacker" threat very
seriously if you're poking fun at Microsoft for what you perceive as their
very serious take on it.

The problem with ASP.NET event validation is that there are legitmate
reasons for not creating lists of allowed values for particular form fields
on the server-side, and instead dynamically creating these lists on the
client-side via script.


"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
message news05C6134-BF73-4430-8DB7-(E-Mail Removed)...
> The only real consequence of disabling eventvalidation is that you are no
> longer protected from rogue hackers who've hijacked your page to attempt
> to
> post illegal formfield values that you didn't intend to be available on
> the
> page. That's all that eventvalidation does.
> Peter
>
> --
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
>
>
> "John Grandy" wrote:
>
>> Does anyone have experience with turning off ASP.NET event validation ?
>> What is the complete set of consequences ?
>>
>> I'm aware that event validation ensures that parameter values submitted
>> to
>> event handlers for read-only ASP.NET web controls ( such as ListBox )
>> must
>> match the list of possible values available at the time the control is
>> rendered on the server; non-matching values will trigger a runtime
>> exception. Turning off event validation removes this restriction.
>>
>> What are the other consequences of turning off event validation ?
>>
>> <pages theme="theme" enableEventValidation="false">
>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      25th May 2007
I'm not poking fun at Microsoft at all on this one. Event validation is a
VERY useful feature. However, as you have noted, it can and does interfere
with legitimate dynamically created element (such as ListItems in a
dropdownlist, for example). However, there are ways to do this and still keep
event validation turned on. Do more research, you'll find some excellent
blog posts on this very subject.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"John Grandy" wrote:

> I can't tell if you're taking this particular "rogue hacker" threat very
> seriously if you're poking fun at Microsoft for what you perceive as their
> very serious take on it.
>
> The problem with ASP.NET event validation is that there are legitmate
> reasons for not creating lists of allowed values for particular form fields
> on the server-side, and instead dynamically creating these lists on the
> client-side via script.
>
>
> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
> message news05C6134-BF73-4430-8DB7-(E-Mail Removed)...
> > The only real consequence of disabling eventvalidation is that you are no
> > longer protected from rogue hackers who've hijacked your page to attempt
> > to
> > post illegal formfield values that you didn't intend to be available on
> > the
> > page. That's all that eventvalidation does.
> > Peter
> >
> > --
> > Site: http://www.eggheadcafe.com
> > UnBlog: http://petesbloggerama.blogspot.com
> > Short urls & more: http://ittyurl.net
> >
> >
> >
> >
> > "John Grandy" wrote:
> >
> >> Does anyone have experience with turning off ASP.NET event validation ?
> >> What is the complete set of consequences ?
> >>
> >> I'm aware that event validation ensures that parameter values submitted
> >> to
> >> event handlers for read-only ASP.NET web controls ( such as ListBox )
> >> must
> >> match the list of possible values available at the time the control is
> >> rendered on the server; non-matching values will trigger a runtime
> >> exception. Turning off event validation removes this restriction.
> >>
> >> What are the other consequences of turning off event validation ?
> >>
> >> <pages theme="theme" enableEventValidation="false">
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Validation Neil B Microsoft C# .NET 0 2nd Jun 2008 02:03 PM
Event Validation Neil B Microsoft C# .NET 2 2nd Jun 2008 01:59 PM
Best Event for textbox validation? BillyRogers Microsoft Access VBA Modules 3 27th Nov 2007 09:41 PM
problem with tab validation event... =?Utf-8?B?QVZM?= Microsoft Dot NET Framework Forms 0 3rd Jul 2007 01:08 PM
Problem with Event Validation Tim Bailey Microsoft ASP .NET 0 24th Apr 2006 12:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:31 AM.