472,779 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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" />

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">
<deny users="?" />

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

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 1846
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
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="15" />

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
by: Amil | last post by:
I must be missing something very simple. I've had a web site running for a long time (anonymous access). Web.config authentication is original (anyone gets in): <authentication mode="Windows"...
by: Eric | last post by:
I am trying to build an app where the stuff in the root directory is open to all, but anything under the Restricted directory requires you to login and I want to use Forms to do it. I'm having...
by: MR. UNDERHILL | last post by:
I want to use forms authentication on my website. Looking at the documentation, I create a sample site for testing. One of my requirements is to ensure that SOME pages required an authenticated...
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the...
by: | last post by:
A Dilemma that I keep being faced with is a scenario where I require authentication on virtually everything. HTMl files, GIF files, XML files, JavaScript files and etc. And I am constantly dealing...
by: nick | last post by:
I have an Asp.Net 2.0 application using form authentication. I want the html pages be protected by the authentication system too. The accessing of html files need to be authenticated in my local...
by: =?Utf-8?B?TWF4IFR1cmF2YW5p?= | last post by:
Hi, Is there any way I can cause a login page to appear, using Forms authentication of course, when access a particular page only. In my case, I am building a site for rental properties. There...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.