Access to different domain in active directory using C# .net application works in local machine but not when hosted in IIS server

3

I'm using a C# web application to search for users in different domain in active directroy. In the actual scenario we have employees from two different domains say for eg: India, US.

When the application is hosted in IIS server, I'm not able to retrive users from US domain. When trying to connect to US domain I get the following error:

> System.Runtime.InteropServices.COMException (0x8007203A): The server
> is not operational. at
> System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at
> System.DirectoryServices.DirectoryEntry.Bind() at
> System.DirectoryServices.DirectoryEntry.get_AdsObject() at
> System.DirectoryServices.DirectorySearcher.FindAll(Boolean
> findMoreThanOne) at
> System.DirectoryServices.DirectorySearcher.FindAll() at
> NovellADTest.AD.btnSyncTest_OnClick(Object sender, EventArgs e)

However, if I run the application on my local machine it works out and fetches users from US domain, but this doesn't work out when hosted in server.

Kindly help me out to solve this issue.

c#
.net
active-directory
asked on Stack Overflow Sep 25, 2012 by user1696218 • edited Sep 25, 2012 by Kieren Johnstone

1 Answer

0

There may be problem due to different scenarios. Give a try on following.

  1. Check for Directory Services insufficient permissions .
  2. It may be a certificate error.

There is a solution at following link but not sure.. if it will work for u..

http://forums.asp.net/t/1096070.aspx/1

answered on Stack Overflow Sep 25, 2012 by Rajesh Subramanian

User contributions licensed under CC BY-SA 3.0