I have a folder “Secured” under the root folder of the project
In the project root web.config authentication is given as
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="15" />
</authentication>
In the “Secured” folder web.config is coded as
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration
If I try to access the Aspx page under “Secured” folder directly without
authentication, the page is getting redirected to “Login.aspx”.
If the “Secured” Folder contains any HTML files and if we try to access the
file without getting authenticated, the HTML page is displayed without
redirection to login page.
This is the behavior if I deploy the website in IIS on Windows Server 2003.
The same site behavior is different in the development environment, when
hosted from filesystem directly using VS 2005. If we try to navigate to HTML
pages directly without authencation in the “Secured” folder the page get
redirected to “login.aspx”
Does that mean authorization in IIS is only done for aspx pages and not HTML
pages?
Please let me know if I am missing some thing on configuration, in
configuring authorization to HTML file in “Secured” Folder.