My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this:
http://my-site.com/address
And I would support ‘*’ symbol in the URL for users. All attempts to navigate to such address are blocked by ASP.NET with the following error message:
HTTP Error 400.0 – Bad Request ASP.NET
detected invalid characters in the URL.
In this case execution doesn’t reach to the ‘BeginRequest’ handler.
Is there any posibility to get ability to process URLs with ‘*’ symbol (and other reserved too if possible).
Thanks
What is the purpose of having a * in the URL, you may be able to disable some URL filtering setting to allow this but this will impact the security of your site. Take a look at the following if you really need to do this:
http://dirk.net/2008/06/09/ampersand-the-request-url-in-iis7/
http://support.microsoft.com/kb/820129
http://www.lostechies.com/blogs/joshuaflanagan/archive/2009/04/27/asp-net-400-bad-request-with-restricted-characters.aspx
An HttpModule which is properly coded and registered in web.config will automatically receive any request which ASP.Net starts to process, if ASP.Net rejects the request prior to starting processing then the BeginRequest method will never get called.
Depending on what you are trying to do it may be better to create a HttpHandler and register it with a wildcard path instead.