Domain could not be contacted problem

From: Grant (gpsnett_at_hotmail.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 20:12:33 -0000

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

  • Domain could not be contacted problem
    ... in active directory and list the members. ... I havent done any ASP programming before. ... The above code works from my console app ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WindowsPrincipal.IsInRole not working
    ... > That is an Active Directory question, but you should be able to change the ... > type of the group unless it contains members that they current group ... be a good way to start down the path of 'knowing when you should use it'! ...
    (microsoft.public.dotnet.security)
  • Are You An ASP Member Yet?
    ... Join the ASP and shift your shareware business into high gear! ... members, and their willingness to share their knowledge and ideas with their ...
    (comp.software.shareware.authors)
  • Re: Active Directory as a X.500 metadirectory
    ... A group object can contain other objects, ... The group object's members attribute contains the DN of each member. ... >>> Active Directory is a little new from the vantage of its implementation, ... >>> console, the containers appear empty, even though, for example the ...
    (microsoft.public.win2000.active_directory)
  • Re: Public Folder Forwarding
    ... It shows only mailbox-enabled objects when you're ... adding members. ... Multiple Contacts are configured in Active Directory ... you could set up a distribution group ...
    (microsoft.public.exchange.admin)