Security Problem With Active Directory

Discussion in 'ASP .Net Security' started by Hriday, Jul 3, 2004.

  1. Hriday

    Hriday Guest

    Hi there,

    I want to get root path for my Active directory. My Active Directory Machine and Web server are on different phisical machine in the same domain. When I execute bellow code form my Web server machine in a web Application,I get error that The specified domain either does not exist or could not be contacted.

    Dim RootDSE As New
    DirectoryServices.DirectoryEntry("LDAP://RootDSE")
    MsgBox(RootDSE.Properties("DefaultNamingContext").Value)


    But the same code gives my root path of AD as
    DC=AD,DC=MyComp,DC=Com when I excute it from a Windows
    Applicatoin. Why is it so...?

    same code gives right result from Windows App, but gives
    above error from my Web Application...is this because of
    there is some (security)problem of my IIS ? otherwise what is
    different in accessing AD through Windows App and Web App..

    How can I get or set my IIS root path to my Active
    directory?

    any help highelly appreciated.

    Thanking you..
    Hriday.


    ___
    Newsgroups brought to you courtesy of www.dotnetjohn.com
    Hriday, Jul 3, 2004
    #1
    1. Advertising

  2. It is a security context problem. ASP.NET typically runs as a local machine
    account instead of a domain account, and ADSI/S.DS needs the domain security
    context to infer a domain controller when you use serverless binding.

    You should either specify a specific domain controller DNS name, specify the
    DNS name of the domain you want to use, or change your underlying security
    model in ASP.NET to use a domain account. For the first two options, you
    binding string would change to:
    LDAP://mydc.mydomain.com/rootdse
    LDAP://mydomain.com/rootdse

    More details here:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;329986

    Joe K.

    "Hriday" <> wrote in message
    news:%...
    > Hi there,
    >
    > I want to get root path for my Active directory. My Active Directory

    Machine and Web server are on different phisical machine in the same domain.
    When I execute bellow code form my Web server machine in a web Application,I
    get error that The specified domain either does not exist or could not be
    contacted.
    >
    > Dim RootDSE As New
    > DirectoryServices.DirectoryEntry("LDAP://RootDSE")
    > MsgBox(RootDSE.Properties("DefaultNamingContext").Value)
    >
    >
    > But the same code gives my root path of AD as
    > DC=AD,DC=MyComp,DC=Com when I excute it from a Windows
    > Applicatoin. Why is it so...?
    >
    > same code gives right result from Windows App, but gives
    > above error from my Web Application...is this because of
    > there is some (security)problem of my IIS ? otherwise what is
    > different in accessing AD through Windows App and Web App..
    >
    > How can I get or set my IIS root path to my Active
    > directory?
    >
    > any help highelly appreciated.
    >
    > Thanking you..
    > Hriday.
    >
    >
    > ___
    > Newsgroups brought to you courtesy of www.dotnetjohn.com
    Joe Kaplan \(MVP - ADSI\), Jul 3, 2004
    #2
    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. =?Utf-8?B?SmF5IEFybXN0cm9uZw==?=

    Active Directory object security

    =?Utf-8?B?SmF5IEFybXN0cm9uZw==?=, Feb 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    523
    =?Utf-8?B?SmF5IEFybXN0cm9uZw==?=
    Feb 25, 2005
  2. Patirck Ige
    Replies:
    4
    Views:
    397
    =?Utf-8?B?UGF0cmljay5PIC5JZ2U=?=
    Oct 31, 2005
  3. Tom Ewall
    Replies:
    1
    Views:
    545
    JScoobyCed
    Aug 17, 2004
  4. Mike
    Replies:
    5
    Views:
    3,004
    Bob Barrows [MVP]
    Jun 9, 2006
  5. rote
    Replies:
    2
    Views:
    479
Loading...

Share This Page