G
Guest
I can not figure out what is the problem that I can protect ASP.NEt form
resource but not some other type of files, for example, images.
All my aspx forms located in Demo folder and image files located in a
subfolder of Demo, named images. I implement Role based form authentication.
When I access all aps forms, it works fine and ask me user/password. However,
I can use IE browser to directly access any image file in subfolder images.
My configuration:
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="login.aspx" path="/"
protection="All"> </forms>
</authentication>
<authorization>
<deny users="?" /> <!--deny anonymous users-->
<allow users="*" /> <!-- Allow all users -->
</authorization>
<location path="images">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
resource but not some other type of files, for example, images.
All my aspx forms located in Demo folder and image files located in a
subfolder of Demo, named images. I implement Role based form authentication.
When I access all aps forms, it works fine and ask me user/password. However,
I can use IE browser to directly access any image file in subfolder images.
My configuration:
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="login.aspx" path="/"
protection="All"> </forms>
</authentication>
<authorization>
<deny users="?" /> <!--deny anonymous users-->
<allow users="*" /> <!-- Allow all users -->
</authorization>
<location path="images">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>