System.Web.HttpRequestValidationException

S

Shail

I receive this exception while debugging:
System.Web.HttpRequestValidationException

saying that
A potentially dangerous Request.Form value was detected
from the client (qtb="... #include <iostream.h> main
()...").

I want to override set the validateRequest=false for a
specific page, how to do it?
 
M

Mark Kucera

You put it in the <%@Page %>

ie...

<%@ Page language="c#" Codebehind="Edit.aspx.cs"
AutoEventWireup="false" Inherits="Edit" validateRequest=false %>

Note this will only work with version 1.1 of the Framework. if you
use this command with version 1.0 it will thrown an exception saying
that validateRequest is an unknown attribute. This can be a real
pain, it would be nice for the runtime to just ignore it but...

Good Luck
MK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top