Re: Domain could not be contacted problem
From: Grant (gpsnett_at_hotmail.com)
Date: 11/22/04
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 22 Nov 2004 21:05:50 -0000
Thank you for the reply! Looking at my web.config file I dont have this
"identity impersonate="true"" section and also it says to "security
mechanism to Anonymous only" - where do I find this security mechanism, and
how would i set the identity impersonate setting?
-------------
When the Web.config file is set to identity impersonate="true"/ and
authentication mode="Windows", use the Anonymous account with the following
settings: . On the ASPX page, set the security mechanism to Anonymous only.
. Clear the Allow IIS to control the password check box.
. Set the Anonymous account to be a domain user.
-------------
Cheers
Grant
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:Op5qpNN0EHA.3244@TK2MSFTNGP10.phx.gbl...
> 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
>>
>
>
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Domain could not be contacted problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]