473,657 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ValidateRequest

Hi,

I have a web form containing a TextBox that allows users to edit XML files.
When the page is posted, the changes are saved. This worked fine until the
ValidateRequest 'feature' came along in .Net 1.1

Now, I've been told that it can be disabled using the 'ValidateReques t'
attribute (of Page). This works on 1.1 and is fine since I always encode and
check my strings manually to ensure no malicious script can be submitted.

The problem is that our web app is distributed to various clients. When they
have 1.1 installed, everything's fine. But most of them are still on the 1.0
Framework. When they access that web form, they receive this error message :

The 'ValidateReques t' attribute is not supported by the 'page' directive.

Now, I've been looking everywhere on how to handle this. I can't believe I'm
the only one facing this problem. I just can't go and tell my clients to
add/remove this attribute in the .aspx source. What is the solution? Is
there a way to programmaticall y set the validateRequest attribute of a Page?
What I would like to do is check the version of the framework and add
validateRequest = False if I'm running on .Net 1.1... help!

Regards,
Shaun.
Nov 17 '05 #1
1 3230
Your not alone ... I have run into various problems with Caching, webcontrol
buttons and much more that simply don't work in the 1.0 framework and only
somewhat work now in 1.1. It is very frustrating and if you find a
solution, please also let me know.


"Shaun Dore" <sh*******@vide otron.ca> wrote in message
news:zU******** *********@charl ie.risq.qc.ca.. .
Hi,

I have a web form containing a TextBox that allows users to edit XML files. When the page is posted, the changes are saved. This worked fine until the
ValidateRequest 'feature' came along in .Net 1.1

Now, I've been told that it can be disabled using the 'ValidateReques t'
attribute (of Page). This works on 1.1 and is fine since I always encode and check my strings manually to ensure no malicious script can be submitted.

The problem is that our web app is distributed to various clients. When they have 1.1 installed, everything's fine. But most of them are still on the 1.0 Framework. When they access that web form, they receive this error message :
The 'ValidateReques t' attribute is not supported by the 'page' directive.

Now, I've been looking everywhere on how to handle this. I can't believe I'm the only one facing this problem. I just can't go and tell my clients to
add/remove this attribute in the .aspx source. What is the solution? Is
there a way to programmaticall y set the validateRequest attribute of a Page? What I would like to do is check the version of the framework and add
validateRequest = False if I'm running on .Net 1.1... help!

Regards,
Shaun.

Nov 17 '05 #2

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

Similar topics

1
20717
by: mar | last post by:
Does anybody know what configuration section should i set to false here. I also tried setting the page directive to false but that didn't fix it. Thanks! mc A potentially dangerous Request.Form value was detected from the client (ResultInput="...="1.0"?> <ResultData xmlns:xs...").
1
1334
by: Benny | last post by:
Hello Experts, If the contents of a text box containing a html tag like formmated characters, i.e. <hello>, and if the validateRequest is set to true, it gives an error when post back: A potentially dangerous Request.Form value was detected from the client. Just wondering what are the drawbacks if the validateRequest is set to true? Under what situations should the validateRequest set to true or false? Thanks,
4
6368
by: Ray Williams | last post by:
I have a specific page that I have chosen to disable the .NET 1.1 validateRequest options by setting the page directive attribute of "validateRequest" from true to false. I manually validate all controls within this page. This page includes a UserControl which contains a textbox. It appears that the validateRequest attribute is not propagated to the usercontrol when the page is processed. This results in the standard "potentially dangerous"...
2
15877
by: Tim Zych | last post by:
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"
8
1864
by: Max Metral | last post by:
Ok, I have a global page class derived from System.Web.UI.Page, let's call it BasePage. I have another class derived from that called MemberPage. It checks the Form collection if it's a post for some "common" fields. Now, I have an aspx page whose code behind derives from BasePage, and which sets ValidateRequest=False in the page directive of the aspx. I can post <script> tags and such with no problems. However, when I make the...
2
2993
by: Andy Fish | last post by:
Hi, I have one textbox on the form that needs to have ValidateRequest disabled, but it seems that it can only be enabled/disabled at a page level. assuming I have to disable it at for the whole page, how can I invoke ValidateRequest functionality for the other text boxes individually? I was looking for some kind of method on I can call that says "validate this control as if ValidateRequest were true" or a function "would this string...
3
2097
by: Umut Tezduyar | last post by:
I couln't find the code begind property on the Page object that represents the "ValidateRequest" attribute on the @Page element. There must be some property that the PageParser knows what to do when when parsing ValidateRequest. I couldn't find any information about this. Besides, it seems only can be declared on the html, and .config. What if i am a control author and want to disable ValidateRequest for some controls. For example, i dont...
4
2146
by: Dave H | last post by:
If put this into my Web.config. Shouldn't this turn off the ValiateRequest app wide? <configuration> <system.web> <pages buffer="true" validateRequest="false" /> I pass SQL around to pages, and sometimes, this causes the 'Cross Site
2
2059
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
8392
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
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.