Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Set RequestValidationMode="2.0" page level?

I am developing a web application based on ASP.NET 4.0 and having some few pages with potential dangerous request(having markup codes).

So instead of setting RequestValidationMode="2.0" in web.config, can I set that property only for those few pages?

like image 619
user1118064 Avatar asked Jul 14 '26 19:07

user1118064


1 Answers

Answer hidden somewhere in msdn, hope this helps you too.. Better late then never Try this,

<location path="test.aspx">
<system.web>
<httpRuntime requestValidationMode="2.0" />
</system.web>
</location>

Reference

http://msdn.microsoft.com/en-us/library/hh882339(v=vs.100).aspx

like image 52
Arjun Shetty Avatar answered Jul 16 '26 07:07

Arjun Shetty