ActiveDirectoryMembershipProvider ASP.NET 2.0

Discussion in 'ASP .Net' started by Arnel, Oct 10, 2005.

  1. Arnel

    Arnel Guest

    I have a web app which uses the new ASP.NET 2.0 login control to
    authenticate against active directory. Now, I would like to use the
    new namespaces (ActiveDirectoryMembershipProvider,
    ActiveDirectoryMembershipUser, MembershipUser, Membership, etc) to
    retrieve the logged in user properties available. I have been able to
    get the logged in username when using Forms auth. with the following
    code. Unfortunately, it doesn't work when I use Windows auth:

    MembershipUser LoginName = Member.GetUser(User.Identity.Name)

    Does anyone know how to retrieve the various properties available for
    AD users?
     
    Arnel, Oct 10, 2005
    #1
    1. Advertising

  2. For it to work for Windows auth you would have to set that on IIS
    Go to IIS >Security and uncheck Anonymous logon and check integrated Windows
    Auth.
    Hope that helps
    Patrick


    "Arnel" <> wrote in message
    news:...
    > I have a web app which uses the new ASP.NET 2.0 login control to
    > authenticate against active directory. Now, I would like to use the
    > new namespaces (ActiveDirectoryMembershipProvider,
    > ActiveDirectoryMembershipUser, MembershipUser, Membership, etc) to
    > retrieve the logged in user properties available. I have been able to
    > get the logged in username when using Forms auth. with the following
    > code. Unfortunately, it doesn't work when I use Windows auth:
    >
    > MembershipUser LoginName = Member.GetUser(User.Identity.Name)
    >
    > Does anyone know how to retrieve the various properties available for
    > AD users?
    >
     
    Patrick.O.Ige, Oct 11, 2005
    #2
    1. Advertising

  3. Arnel

    Arnel Guest

    Re: ActiveDirectoryMembershipProvider ASP.NET 2.0

    Thanks, Patrick. But I've already set this. I have no problem
    authenticating against AD, and I can retrieve user account properties
    using System.DirectoryServices. However, I cannot seem to get the new
    classes in ASP.NET 2.0 to work. I want to avoid using the
    DirectoryServices namespace because I would like to utilize the
    ADmembership provider in 2.0.
     
    Arnel, Oct 11, 2005
    #3
  4. Re: ActiveDirectoryMembershipProvider ASP.NET 2.0

    There is a nice blog on thet here at:-
    http://blogs.msdn.com/gduthie/archive/2005/08/17/452905.aspx
    Hope that helps
    Patrick

    "Arnel" wrote:

    > Thanks, Patrick. But I've already set this. I have no problem
    > authenticating against AD, and I can retrieve user account properties
    > using System.DirectoryServices. However, I cannot seem to get the new
    > classes in ASP.NET 2.0 to work. I want to avoid using the
    > DirectoryServices namespace because I would like to utilize the
    > ADmembership provider in 2.0.
    >
    >
     
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 31, 2005
    #4
    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. Natan Vivo
    Replies:
    1
    Views:
    660
    Patrick.O.Ige
    Oct 31, 2005
  2. Replies:
    0
    Views:
    658
  3. =?Utf-8?B?SkQgUWl4Y2xl?=
    Replies:
    2
    Views:
    5,281
    =?Utf-8?B?SkQgUWl4Y2xl?=
    Jun 9, 2006
  4. moi
    Replies:
    1
    Views:
    5,880
  5. Parag Mahajan
    Replies:
    0
    Views:
    572
    Parag Mahajan
    May 12, 2006
Loading...

Share This Page