User login with ADSI

Discussion in 'ASP .Net Security' started by Kenneth Keeley, Dec 16, 2003.

  1. Hi,
    Under ASP I was able to use code like that listed below to confirm login
    details on our intranet site. I wish to upgrade our site to run purely under
    ASP.NET. I am having trouble converting this code to ASP.NET code somebody
    point me in the right direction with some sample code like this done in
    ASP.NET

    set ADSI = GetObject("WinNT:")
    set IIS = ADSI.OpenDSObject("WinNT://MyDomain/" & Request.Form("UserName") ,
    Request.Form("UserName"), Request.Form("Password"),
    ADS_SECURE_AUTHENTICATION)
    IF err.Number = 0 THEN
    Response.Cookies("UserName") = Request.Form("UserName")
    Response.Cookies("UserName").Expires = "July 1, 2020"
    End If

    Thanks
    Kenneth Keeley, Dec 16, 2003
    #1
    1. Advertising

  2. Chris Marchal[MSFT], Dec 23, 2003
    #2
    1. Advertising

  3. That Article is as useful as tits on a bull. It might be fine if you are
    some sort of Microsoft super dickhead but if you are simple person how is
    just tring to make a living in the real world then I find it useless and a
    waste of my time. Not every body in the world has millions of dollors to was
    on all the bullshit CD's that microsoft generate so that you can create a
    web page that should only need 20+ lines of code. So how about provideing an
    example in simple easy to follow code.

    "Chris Marchal[MSFT]" <> wrote in message
    news:...
    > The ADSI managed objects are in the System.DirectoryServices namespace.
    > There is a good article on authenticating in ASP.NET against active
    > directory here:
    >
    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht
    > ml/SecNetHT02.asp
    >
    > Chris Marchal
    > Microsoft UK Developer Support
    > This posting is provided "AS IS" with no warranties, and confers no

    rights.
    >
    Kenneth Keeley, Dec 29, 2003
    #3
    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. venkat

    Retrieve logon user name from ADSI

    venkat, Nov 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    457
    venkat
    Nov 6, 2003
  2. shiv

    ADSI - User A/c Info Question

    shiv, Nov 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    342
    Natty Gur
    Nov 16, 2003
  3. Kenneth Keeley

    User login with ADSI

    Kenneth Keeley, Dec 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,463
    Kenneth Keeley
    Dec 15, 2003
  4. Tony Johansson
    Replies:
    3
    Views:
    16,198
    Patrice
    Jan 2, 2010
  5. Jeremie Legault
    Replies:
    0
    Views:
    174
    Jeremie Legault
    Nov 23, 2005
Loading...

Share This Page