.net – Can’t set httpRuntime requestValidationMode=”2.0″ in webconfig

.net-4.0asp.netnet

I've switech from 2.0 to 4.0 a web application.

I've an issue with validateRequest="false", I need to read an xml files from an aspx page (the page is called by another website and it's not seen by users). It worked fine in 2.0. Now the other website return an error 500.
I ve found on google that in the webconfig system.web, I had to set but the property requestValidationMode is not valid (and intellisense doesnt show it to me in VS)…

How can I do that?

Thanx

Best Answer

You add this code

<system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime requestValidationMode="2.0" />
</system.web>

Nota : On IIS :  Right click on WebSite 
                 - Select> Properties > ASP.NET > Version > 
                 - Select 4.0.21006 not 2.0
Related Topic