473,796 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="add code.aspx.vb"
Inherits="codel ib.addcode" validateRequest ="false"%>

but I get the error:

The 'validateReques t' 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 'validateReques t'.

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 15884
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_no worms_link_dott tt.net> wrote in message
news:e4******** ******@TK2MSFTN GP09.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="add code.aspx.vb"
Inherits="codel ib.addcode" validateRequest ="false"%>

but I get the error:

The 'validateReques t' 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 'validateReques t'.

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*****@somewh ere.net> wrote in message
news:#7******** *****@TK2MSFTNG P11.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_no worms_link_dott tt.net> wrote in message
news:e4******** ******@TK2MSFTN GP09.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="add code.aspx.vb"
Inherits="codel ib.addcode" validateRequest ="false"%>

but I get the error:

The 'validateReques t' 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 'validateReques t'.

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
2427
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 error System.Web.HttpRequestValidationException (0x80004005) Detect the potential danger of Request.Form value from client side (idHidxml="<recordset><record><...") System.Web.HttpRequest.ValidateString(String s, String valueName, String...
0
6465
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 should display the result. </head> <body MS_POSITIONING="GridLayout" bgcolor="gainsboro"> <form id="Form1" method="post" runat="server"> <INPUT style="Z-INDEX: 101; LEFT: 248px; POSITION:absolute; TOP:184px" type="button" value=" OK "...
0
1822
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 selected (e.g. ASP.NET calendar control, HTML radio/option buttons), a postback occurs. In addition, I have a input button, that when clicked, initiates a HTTP Post Request. Notably the input button utilizes client side javascript to change the
5
1788
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" ValidateRequest="false" Src="~/Edit/Item.cs"%> But the compile says can't use more than one "@Page" directive. Or,I need to "include" another class from a .cs into a currently .ascx using:
2
2067
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) Thanks.
0
2183
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 this can not be done, can i set this flag on demand from code (from inside the usercontrol). ?
4
3768
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" CodeFile="x.aspx.vb" Inherits="_Replicator" ValidateRequest="false" MaintainScrollPositionOnPostback="true" %> I'm getting:
0
1005
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 validaterequest="false" or the other side can't post to my side. Is setting validaterequest="false" the right way to go? Thanks, Cindy
2
2162
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 validaterequest="false" or the other side can't post to my side. Is setting validaterequest="false" the right way to go? Thanks, Cindy
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.