Authentication of users to access html files

Discussion in 'ASP General' started by Arun, Dec 13, 2005.

  1. Arun

    Arun Guest

    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.
    Arun, Dec 13, 2005
    #1
    1. Advertising

  2. 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.
    Bob Barrows [MVP], Dec 13, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sara rafiee
    Replies:
    3
    Views:
    1,041
    Scott Allen
    Oct 4, 2004
  2. ABC
    Replies:
    7
    Views:
    812
  3. Sunil Miriyala
    Replies:
    0
    Views:
    745
    Sunil Miriyala
    Mar 1, 2004
  4. bitshift
    Replies:
    1
    Views:
    530
    bruce barker
    Jun 22, 2007
  5. Replies:
    0
    Views:
    506
Loading...

Share This Page