473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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?



Nov 18 '05 #1
2 15865
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:e4**************@TK2MSFTNGP09.phx.gbl...
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?


Nov 18 '05 #2
Thanks for the article. It's over my head but it gives me some good insight.

"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:#7*************@TK2MSFTNGP11.phx.gbl...
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:e4**************@TK2MSFTNGP09.phx.gbl...
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?



Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tom | last post by:
Hi I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following...
0
by: Martin Colmenares | last post by:
After I set my <%@ page ValidateRequest="false" %> , I still get the error illustrated below. The msdn mentioned something about filtering using the HTMLEncode. This is a snippet of the code that...
0
by: Peter O'Reilly | last post by:
I receive the following error when I post a webpage: "Unable to validate error" - System.Web.HTTPException. The web page is an ASP WebForm page. I have a few controls on the page that when...
5
by: farmer | last post by:
I need "include" multiple classes from multiple files such as: <%@ Page Language="C#" Debug="true" ValidateRequest="false" Src="~/Auth/Pub/Auth.cs"%> <%@ Page Language="C#" Debug="true"...
2
by: \A_Michigan_User\ | last post by:
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... How would I trap/detect that a textBox contains some illegal characters? (I'm using asp.net v1.1 and vb.net)...
0
by: Edwin Knoppert | last post by:
My usercontrol posts some html code, asp.net complains and therefore i set validateRequest ="false" But i would like to set it for the single textbox and not the whole page or all pages. If...
4
by: jobs | last post by:
I'm running vs2005 and asp.net framework 2.0 I thought adding the new preset them was just adding it to the directive: <%@ Page Language="VB" Theme="BasicBlue" AutoEventWireup="false"...
0
by: CindyH | last post by:
Hi I'm using .net 2.0. I am receiving a http post that is sent httpUtility.urlencode(doc.Outerxml). Everything works fine and I can receive the post and parse it, but I need to set...
2
by: CindyH | last post by:
Hi I'm using .net 2.0. I am receiving a http post that is sent httpUtility.urlencode(doc.Outerxml). Everything works fine and I can receive the post and parse it, but I need to set...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.