Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > validateRequest="false" not working in web.config or page directive

Reply
Thread Tools

validateRequest="false" not working in web.config or page directive

 
 
Tim Zych
Guest
Posts: n/a
 
      05-16-2004
I'm trying to stop .Net from validating data entered into a textbox. When I
enter < or > .Net returns an error:

potentially dangerous Request.Form value was detected from the client...

so a search on google indicates a couple of options:

1. Add validateRequest = "false" in the page directive. So I add it:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="addcode.aspx.vb"
Inherits="codelib.addcode" validateRequest="false"%>

but I get the error:

The 'validateRequest' attribute is not supported by the 'page' directive.

2. or add <pages validateRequest="false" /> in system.web of the web.config
file:

but when I do that I get the error:

Parser Error Message: Unrecognized attribute 'validateRequest'.

I guess I cannot use either of these with .Net 2002, which I have. Is there
any way around the first error caused by entering "malicious" code?







 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      05-16-2004
Tim,

This functionality was introduced in version 1.1 of the .NET framework. See
http://msdn.microsoft.com/library/en...protection.asp
for a way to add similar functionality to a version 1.0 application.

HTH,
Nicole



"Tim Zych" <tzych@earth_noworms_link_dotttt.net> wrote in message
news:...
> I'm trying to stop .Net from validating data entered into a textbox. When
> I
> enter < or > .Net returns an error:
>
> potentially dangerous Request.Form value was detected from the client...
>
> so a search on google indicates a couple of options:
>
> 1. Add validateRequest = "false" in the page directive. So I add it:
>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="addcode.aspx.vb"
> Inherits="codelib.addcode" validateRequest="false"%>
>
> but I get the error:
>
> The 'validateRequest' attribute is not supported by the 'page' directive.
>
> 2. or add <pages validateRequest="false" /> in system.web of the
> web.config
> file:
>
> but when I do that I get the error:
>
> Parser Error Message: Unrecognized attribute 'validateRequest'.
>
> I guess I cannot use either of these with .Net 2002, which I have. Is
> there
> any way around the first error caused by entering "malicious" code?
>
>
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Tim Zych
Guest
Posts: n/a
 
      05-16-2004
Thanks for the article. It's over my head but it gives me some good insight.

"Nicole Calinoiu" <> wrote in message
news:#...
> Tim,
>
> This functionality was introduced in version 1.1 of the .NET framework.

See
>

http://msdn.microsoft.com/library/en...protection.asp
> for a way to add similar functionality to a version 1.0 application.
>
> HTH,
> Nicole
>
>
>
> "Tim Zych" <tzych@earth_noworms_link_dotttt.net> wrote in message
> news:...
> > I'm trying to stop .Net from validating data entered into a textbox.

When
> > I
> > enter < or > .Net returns an error:
> >
> > potentially dangerous Request.Form value was detected from the client...
> >
> > so a search on google indicates a couple of options:
> >
> > 1. Add validateRequest = "false" in the page directive. So I add it:
> >
> > <%@ Page Language="vb" AutoEventWireup="false"
> > Codebehind="addcode.aspx.vb"
> > Inherits="codelib.addcode" validateRequest="false"%>
> >
> > but I get the error:
> >
> > The 'validateRequest' attribute is not supported by the 'page'

directive.
> >
> > 2. or add <pages validateRequest="false" /> in system.web of the
> > web.config
> > file:
> >
> > but when I do that I get the error:
> >
> > Parser Error Message: Unrecognized attribute 'validateRequest'.
> >
> > I guess I cannot use either of these with .Net 2002, which I have. Is
> > there
> > any way around the first error caused by entering "malicious" code?
> >
> >
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Assembly directive not working G Dean Blake ASP .Net 2 02-03-2005 11:08 PM
Assembly directive not working? G Dean Blake ASP .Net Building Controls 0 02-03-2005 09:05 PM
Re: validateRequest=&quot;false&quot; not working in web.config or page directive Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 0 05-16-2004 09:23 AM
The 'Location' attribute is not supported by the 'OutPutCache' directive????when i set in the directive .NET Follower ASP .Net 1 02-13-2004 10:32 AM
Location tag in cahe directive not working?? .NET Follower ASP .Net 0 02-05-2004 08:03 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57