I need to do some validation before a page is served. If the validation is OK, the request should follow its normal flow; if not, it must redirect to another page and in that page the user will see something like an agreement, accept it and after that the pages should load as normal.
So, I have an application that have some pages on ASP Classic and others in ASP.NET. What I'm trying to do is to add an HttpModule to handle all the requests to do some logic to redirect, depending on the results, to another page.
So, in the IIS the ASP application is on top the others applications, and inside of that application I have other applications that are .NET.
I created an HttpModule to test it, registered the DLL and added the corresponding configuration on the web.config file that is at the ASP Application level.
This is the block I added to my web.config file
<system.web>
<customErrors mode="Off"></customErrors>
<httpModules>
<add name="TestHttpModule" type="TestHttpModule.TestHttpModule, TestHttpModule,Version=1.0.0.0, Culture=neutral, PublicKeyToken=d76c51db0a9391cf"/>
</httpModules>
</system.web>
The module just fires when an ASPX page is requested, but it doesn't when an ASP page is requested.
So is it possible to use a custom HttpModule for ASP pages or is not possible?
If not, do you know any other kind of approach for doing that?
The applications uses its App Pool in classic mode.
Thanks in advance!