xpblueScreenOfDeath
Programmer
- Sep 1, 2004
- 87
I am using ASP .NET(version 1.1). My http authentication module is called for every webpage that is under may project even though I specified in my web.config to only authentication for a specify directory? Am I missing somethings or is my web.config done wrong for what I am trying to accomplish?
My default is to allow anybody access. The location part of the web.config should have override the default no authentication for the directory "test" to use my http module. But my http module is called for every webpage under my project. Am I doing something wrong or am I suppose to do something in the http module to check for the location?
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<httpModules>
<add name="mod1" type="xx.yy,mod1"/>
</httpModules>
</system.web>
<location path="test">
<system.web>
<authorization>
<allow roles="EUser" />
<deny users="*" />
</authorization>
</system.web>
</location>
</configuration>
My default is to allow anybody access. The location part of the web.config should have override the default no authentication for the directory "test" to use my http module. But my http module is called for every webpage under my project. Am I doing something wrong or am I suppose to do something in the http module to check for the location?