Questions tagged [requestvalidationmode]

9 questions
16
votes
5 answers

How do I disable request validation without setting RequestValidationMode to 2.0?

We've just upgraded to ASP.NET 4.0, and found that requestValidation no longer works. The MSDN docs suggest we need to set requestValidationMode in web.config to 2.0: 4.0 (the default). The HttpRequest object internally sets a flag that indicates…
Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
9
votes
1 answer

doesn't work (using IIS 6.0)

I'm getting errors with an application on our test web server, which has .NET 4.0 installed, when I input HTML into a form. I get the usual errors of: A potentially dangerous Request.Form value was detected from the client This is being caused…
Chris Halcrow
  • 91
  • 1
  • 1
  • 2
5
votes
1 answer

ASP.NET MVC handling RequestValidationException in Area

I have a custom filter that I've used for years for handling RequestValidationExceptions in a more user-friendly way. It works without issues in all scenarios until I introduce an Area: public class HandleHttpRequestValidationExceptionAttribute :…
Ted
  • 7,122
  • 9
  • 50
  • 76
3
votes
2 answers

asp.net 4 custom request validator doesn't seem to work

i am following the example at http://msdn.microsoft.com/en-us/library/system.web.util.requestvalidator.aspx but it doesn't seem to work and i still get error. Here is my class and how i add it to webconfig my webconfig:
nLL
  • 5,662
  • 11
  • 52
  • 87
3
votes
1 answer

cant use requestvalidationmode in framework 3.5

First I got an exception : System.Web.HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value.... from searching the web I found that adding to my web.config :
2
votes
1 answer

How do I turn off request validation in MVC3?

I've installed the RC1 release of MVC 3 and I'm using Entity Framework 4 for my model. NOTE: I had this working just fine in MVC2, but MVC3 changed how this works. I've read the following articles and was able to get to the code below... Granular…
Brian
  • 37,399
  • 24
  • 94
  • 109
1
vote
1 answer

requestvalidationmode causes issue with build script

I added requestvalidationmode=2.0 to my page header. Everything works great. However when I try and build this on my build server it crashes with this message: errorASPPARSE: Error parsing attribute 'requestvalidationmode': Type 'MYASPFORM' does…
Xander
  • 9,069
  • 14
  • 70
  • 129
0
votes
1 answer

'requestValidationMode=2.0' make the url case sensitive

I am working on some asp.net MVC4 project (iis 7). To prevent "Potentialy dangerous request" message I added to the web.config file the line "httpRuntime requestValidationMode="2.0" />" It did prevent the message but another thing occurred - the url…
neriag
  • 151
  • 1
  • 9
0
votes
3 answers

and not working

I've inherited an MVC asp.net app using framework 4.0. I'm getting the dreaded "A potentially dangerous Request.Form value was detected from the client" error and all my research leads me to believe that this should fix it:
jopeek
  • 137
  • 1
  • 2
  • 8