validateRequest="false" not working in web.config or page directive

T

Tim Zych

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"
Inherits="codelib.addcode" validateRequest="false"%>

but I get the error:

The 'validateRequest' 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 'validateRequest'.

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?
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top