Password Protecting a portion of the website

Last post 10-23-2007 10:15 AM by e_stylzz. 3 replies.

Sort Posts:

  • Password Protecting a portion of the website

    10-15-2007, 2:00 PM
    • Member
      18 point Member
    • e_stylzz
    • Member since 07-17-2007, 11:18 AM
    • Delaware
    • Posts 100

    Currently what I have setup will work for a day or two then it will stop working.

     Protected pages are located in a folder called admin.  The admin folder also has a web.config file to deny all users.

    At the root level I have a login page and a web.config file with usernames and passwords hardcoded in.

    I read that this is how to set it up and it will work, but only for a day or two.  After that, it looks for the login.aspx file in the admin folder instead of the root.  If I change to where it points in the web.config file, I can't get past the login form.  Any ideas?

     
    admin/protected files

    admin/web.config            - only denies all users

    /login.aspx

    /web.config

     

  • Re: Password Protecting a portion of the website

    10-17-2007, 1:08 AM
    Answer

    e_stylzz:

    it looks for the login.aspx file in the admin folder instead of the root.  If I change to where it points in the web.config file, I can't get past the login form.  Any ideas?

    Hi

    I suggest you specify absolute path for loginUrl. Please try to add this line in web.config file which locate at Root path of website.

    <authentication mode="Forms">
        <
    forms loginUrl="~/login.aspx" name="appName" timeout="60" path="/"> </forms>
    </
    authentication>

     

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Password Protecting a portion of the website

    10-17-2007, 7:39 AM
    • Member
      18 point Member
    • e_stylzz
    • Member since 07-17-2007, 11:18 AM
    • Delaware
    • Posts 100

    That did it.  I had originally tried that, but with the web.config file in the admin folder and that didn't work.  Thats so much!!!! 

  • Re: Password Protecting a portion of the website

    10-23-2007, 10:15 AM
    • Member
      18 point Member
    • e_stylzz
    • Member since 07-17-2007, 11:18 AM
    • Delaware
    • Posts 100

    Well, it worked for a few days then started doing the same thing again: Looking for the login.aspx file in the admin folder.

     .Any ideas now?

    Server Error in '/library/admin' Application.

    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /library/admin/login.aspx

Page 1 of 1 (4 items)