469,934 Members | 2,248 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Authentication of users to access html files

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.

Dec 13 '05 #1
1 1717
Arun wrote:
I have a folder "Secured" under the root folder of the project
In the project root web.config authentication is given as
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="15" />
</authentication>

Does that mean authorization in IIS is only done for aspx pages and
not HTML pages? <snip> Please let me know if I am missing some thing on configuration, in
configuring authorization to HTML file in "Secured" Folder.


I'm sorry, but I don't know the answer to your question.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kris van der Mast | last post: by
3 posts views Thread by Amil | last post: by
2 posts views Thread by nick | last post: by
3 posts views Thread by =?Utf-8?B?TWF4IFR1cmF2YW5p?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.