473,405 Members | 2,421 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,405 software developers and data experts.

RequestValidation

Hi -

I have the following lines of code
Response.Cookies("test1").Value = "<bad data>"
Response.Cookies("test2").Value = "this is a test"
TextBox1.Text = Request.Cookies("test2").Value

It triggers the error
"A potentially dangerous Request.Cookies value was detected from the client
...."
I am aware that I can set the requestValidation=false and will take care of
the error.

However... What is of interest to me is that I am not retreiving "test1",
which is the source of the problem. How could I best trap this and let it go
through without setting requestValidation=true at the page level?

Many thank
Shahriar

Oct 4 '06 #1
1 3407

hmm, could you catch the exception it is throwing for the "dangerous
request.cookies..." and then look into the innerexception? It might be
in there.

I'm not sure what kind of exception that throws.

Sean

Shahriar wrote:
Hi -

I have the following lines of code
Response.Cookies("test1").Value = "<bad data>"
Response.Cookies("test2").Value = "this is a test"
TextBox1.Text = Request.Cookies("test2").Value

It triggers the error
"A potentially dangerous Request.Cookies value was detected from the client
..."
I am aware that I can set the requestValidation=false and will take care of
the error.

However... What is of interest to me is that I am not retreiving "test1",
which is the source of the problem. How could I best trap this and let it go
through without setting requestValidation=true at the page level?

Many thank
Shahriar
Oct 4 '06 #2

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

Similar topics

2
by: hillcountry74 | last post by:
Hi, I'm stuck with this regular expression from past 2 days. Desperately need help. I need a regular expression that will allow all characters except these *:~<>' This is my code in...
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...
6
by: Jeremy | last post by:
I have an .aspx page with a textbox on it, and whenever a users tries to submit some HTML type code it generates an unhandled exception error for it being "A potentially dangerous Request.Form...
2
by: Nick Gilbert | last post by:
Hi I have a number of pages where it is valid for the user to enter HTML. On these pages, I have turned off RequestValidation ("ValidateRequest = false" in the page directive) so that the...
8
by: Mark | last post by:
We have a multi-line textbox that users copy and paste email text into. The pasted text frequently will contain a tag like <blah@aol.com> or similar. I believe .NET is protecting itself from code...
2
by: Jayme Pechan | last post by:
If I try to put some invalid input (<TEST>) into a asp:textbox and attempt to submit the data, I get a server error response: Server Error in '/XTAPIADMIN' Application....
3
by: Joe via DotNetMonster.com | last post by:
Hi, I have an form that saves to a database. I would like the user to be able to enter HTML tags into the Textbox Control fields but I get an error message when entering HTML tags: A...
2
by: Ben R. | last post by:
Is there any way to selectively have ValidateRequest on based on the logged in user? Also, can we control what tags will be allowed? For example, I don't have a problem with my users toggling...
2
by: Steve Richter | last post by:
getting this "potentially dangerous Request.Form value was detected" exception with a textbox which I have populated with some source code. I think I am getting the exception when I click OK on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.