Re: Domain could not be contacted problem

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 14:39:45 -0600

This is a security context issue. The account your code is running under
might not be a domain account, so you can't use serverless binding (which is
what you are doing when you don't put a server name in the binding string
below).

This document has a lot more detail:

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

Joe K.

"Grant" <gpsnett@hotmail.com> wrote in message
news:u2KGc%23M0EHA.2528@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I got some sample code off the MSDN website on how to loop through a group
> in active directory and list the members. I can run the code from a
> console app but I cant run it from an ASP solution? I get the folowing
> message:
>
> "The specified domain either does not exist or could not be contacted"
>
> Heres the code Im using:
> ---------------------------------------------------
> try
> {
> DirectoryEntry group = new
> DirectoryEntry("LDAP://CN=Administrators,CN=builtin,DC=ourdomain,DC=com");
> object members = group.Invoke("Members",null); //CODE IS FAILING HERE
> foreach( object member in (IEnumerable) members)
> {
> DirectoryEntry x = new DirectoryEntry(member);
> }
> }
> catch ( Exception ex )
> {
> lblResults.Text = ex.Message;
>
> }
> ---------------------------------------------------
>
> I havent done any ASP programming before. This is a standard
> webapplication created using Visual Studio.NET 2003. I have IIS installed
> and Ive set the permissions to interactive user. The above code works from
> my console app and works a beaut but just not from my ASP page..
>
> can anyone tell me what Im doing worng here?
>
> Thanks,
> Grant
>



Relevant Pages

  • Re: Domain could not be contacted problem
    ... might not be a domain account, so you can't use serverless binding (which is ... > in active directory and list the members. ... > console app but I cant run it from an ASP solution? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Cant make a domain user the "anonymous access" user
    ... I have tried both with and without Integrated authentication enabled. ... I get a login prompt if I am using an NTLM-capable ... I can then authenticate using the domain account ... Pool containing this ASP page ...
    (microsoft.public.inetserver.iis.security)
  • Re: Domain Account member of local group
    ... By default Domain Admins are members of the local administrators for all servers/and/workstations. ... To allow a normal user or members of a given Group to RDP to a workstation or a set of workstations you add that user/or/Security group to that local group on the workstations/servers. ... I can Remote Desktop onto an XP workstation in my domain, if the local account I'm using is a member of local group "Remote Desktop Users". ... It only appears to work if I put the domain account in the "Domain Administrators" group, which gives the account access to ALL XP workstations. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Access network shares with filesystemobject
    ... asp runs pages with the iis authentication account defined for anonymous. ... still must setup a domain account for anonymous. ...
    (microsoft.public.dotnet.framework.aspnet)