Can you please help in finding a way to change Validate Request to True/False in IIS using PowerShell for a website?
Asked
Active
Viewed 2,073 times
2 Answers
2
You can modify the configuration settings of a specific web site or application using the Set-WebConfiguration cmdlet.
In your case you'll have to set the value of the <pages validateRequest="true" />
attribute to false
:
Set-WebConfiguration "//system.web/pages/@validateRequest" IIS:\Sites\MyWebSite -Value $false

Enrico Campidoglio
- 56,676
- 12
- 126
- 154
0
According to this Canceling request validation using HttpHandler on IIS 7 and this Canceling request validation using HttpHandler on IIS 7
You should just change registry setting, so this code should do the trick for you:
Set-ItemProperty -path HKLM:\Software\Microsoft\ASP.NET -name VerificationCompatibility -Value 1

Community
- 1
- 1

Andrey Marchuk
- 13,301
- 2
- 36
- 52
-
1Changing that setting will affect the entire server and not just a specific web site or application. – Enrico Campidoglio Mar 09 '12 at 11:36