www.webdeveloper.com
Results 1 to 4 of 4

Thread: What if I wanted two Authentications on my website?

  1. #1
    Join Date
    Jul 2004
    Posts
    61

    What if I wanted two Authentications on my website?

    In an article from 4guysfromrolla.com is states the follwong:
    The Authentication Tag can only be configured at the Application root level, otherwise an error will be thrown by the Application.


    That's fine, but how would I configure to directories on my site to have separate authentication? What if I wanted one folder on my website to have authentication for admin only and another authentication for visitor's page? Anyone know?

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    Make virtual directories in your root directory their own applications, then put the authentication at the root of those applications.

  3. #3
    Join Date
    Jul 2004
    Posts
    61

    Virtual Directory

    Meaning by what you said, are you saying to leave the current root directory as one area for authentication and then create another virtual directory on a sub folder? I've created those before, but would it work? If I have a sub folder and create a virtual directory on it, would the web.config file treat the sub folder as the root directory?

  4. #4
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    Each virtual directory, if it is its own application, will be the root directory for its own application. Each application may have a web.config in it. Thats how a web.config works, it is the configuration for the entire application, and if the sub directory or virtual directory is set to be its own application it should have its own web.config, and that means it can have its own forms auth code in that web.config file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles