Four our current .aspx website we have a custom HttpModule which does the Authorization (which user can see what). I've rebuilt our old .aspx website to MVC. And because our clients won't all en masse switch to the MVC website I can't use MVC's Action filters, but I need to continue to use the HttpModule.
The problem is that I get Http error 404.
What I've done: - MVC application is bin deployed properly (this is verified because without the HttpModule configured in IIS it works fine); - Appropiate configurations in the Web.Config and IIS7.5 for the HttpModule are made (this is verified because I write logentries to a file from the HttpModule to see if the module gets called in the first place and runs as expected)
Web.config file:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="WebHIS_Authorization" type="WebHIS_Authorization.AuthorizationModule" />
</modules>
</system.webServer>
So everything seems to work fine. BeginRequest of the HttpModule is entered according to the log. I've even verified in my logfile that right before the HttpModule leaves the BeginRequest method the URL is still as expected. But it simply seems as if the MVC routing doesn't work anymore after the HttpModule is left by the HttpRequest and IIS returns 404. I hope I can be helped.
If you need to see specific things please ask and I'll provide the appropiate information.