RequestValidation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top