Authentication of users to access html files

A

Arun

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.
 
B

Bob Barrows [MVP]

Arun said:
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?
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top