I am trying to create a URL rewriting module for ASP.NET.
Here’s how I declared it:
namespace A.Webrole
public class UrlRewriterHttpModule : IHttpModule{...
and I said
<system.webServer>
<modules>
<add name="UrlRewriterHttpModule" type="A.Webrole.UrlRewriterHttpModule"/>
</modules>
</system.webServer>
in the Web.config file.
Then I put breakpoints inside public void Init(HttpApplication context) method of UrlRewriterHttpModule however no breakpoints stopped the execution.
Then I just renamed the class to a dummy name and restarted the application again, no exceptions are thrown class not found etc.
Do you have any ideas why this might not be even loading the http module?
This depends on what you’re doing to test it. If you’re using Visual Studio’s built in web server, or IIS6 it requires a different config setting;
Of course, you could just use the MS supplied rewriter if it were suitable and save some time 🙂