I am creating a mvc application with Areas. I Need to have different authentication method for these areas.
I Usually use httpmodules for authentication, in the http module i check if the user is authenticated (i usually use cookies) and if not i redirect him.
So i have an httpmodule for authenticating the whole application and i want to register another httpmodule for authenticating in the area.
I tried:
- using a web.config file in the area folder and listing the httpmodule there.
- Using a location section in the web.config file.
Both did not work for me the httpmodule never got called.
- How can i register a httpmodule for an area.
- How can i override the httpmodule of the whole app.
- If this is the wrong way of going about it what is a better way of doing this.
Thanks