I have a web application that I've inherited that has double encoded URLS. If it where possible I'd simply fix the instances where the URLs are being double encoded, but this is not possible. I am able to process the URLs if I use:
<requestFiltering allowDoubleEscaping="True" />
Is it possible to apply this to only a single page?
in the IIS webserver section, double click the 'Request Filtering' icon. in the 'File Name Extension' right click->Edit Feature Settings...' the file 'web. config' check the option 'Allow double escaping' (this option is unchecked by defualt)
In the Home pane, double-click Request Filtering. In the Request Filtering pane, click the URL tab, then click Allow URL... in the Actions pane. In the Allow URL dialog box, enter the URL that you wish to allow, and then click OK.
Yes, it should be possible, you can add that in a <location path='file'> tag inside the web.config of your application.
Example:
<location path="CustomHttpHandler">
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
</system.webServer>
</location>
Or if you want to use the UI (IIS Manager), you can drill-down in the Tree all the way to the folder where the file is contained, then click the "Content View" and right-click the file and choose "Switch to Features View" at that point you will see the file in the Tree. Now you can set any IIS setting and it will only apply to that File, so go to the Request Filtering icon and set the value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With