Authenticating using domain user/password

Last post 04-11-2007 5:26 PM by john.lieurance@flhosp.org. 2 replies.

Sort Posts:

  • Authenticating using domain user/password

    04-10-2007, 2:13 PM
    • Loading...
    • KamyarM
    • Joined on 06-09-2003, 3:12 PM
    • Posts 48

    I currently have an application that authenticates users based on their roles in Active Directory.  This works fine, however, now that I have moved my application to a staging environment I'm running into a little problem.  You see, there's no way of knowing who my user who is making the request to use my application since they will be coming from a different domain (hence the reason why they're anonymous).

    Initially, I configured IIS to force the user to enter their domain user/password for that domain when they try to access my .aspx page.  This obviously works since IIS takes care of the client context for me (so in other words I know who's making the request now because IIS successfully authenticates the user for me).  However, this poses as a problem because the box forces any other user trying to access its resources to be prompted a user/pass dialog.

    Now to my question :) Does ASP.NET leverage IIS in terms of allowing the user to provide their username/password through a web form, and have the plumbing under the hood take care of the IIS authentication? So in other words, I want to IIS to authenticate my user so that I have the context needed in my application, but instead of having the box force a user/pass dialog, I just want to create a login page where the user provides the credentials and behind the scenes I'll provide those credentials to IIS and have the user authenticated.  Thanks in advance!

  • Re: Authenticating using domain user/password

    04-10-2007, 5:52 PM
    • Loading...
    • KamyarM
    • Joined on 06-09-2003, 3:12 PM
    • Posts 48

    Maybe I worded my question wrong. 

    You can configure IIS to disable anonymous access.  When you do this, anytime you make a new request to the IIS machine, you're prompted a dialog box which asks for your username and password.  Upon authentication, you are then allowed access to the resource you were trying to access.

    I want to leverage this, but instead of having the machine prompt the user with a dialog, I just want to create a login page so that the user can provide their credentials, then let IIS authenticate the user with the provide credentials.

    Is this possible?

  • Re: Authenticating using domain user/password

    04-11-2007, 5:26 PM
    Answer

    I think this example will show you how to do what you want. It shows you how to replace Windows Authentication with Forms Authentication.

    http://msdn2.microsoft.com/en-us/library/ms998347.aspx

    Good Luck,
    Johnny

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter