Server Not operational

442 Views Asked by At

This is the connectionString am using in my web.config:

<add key="GlobalAppStoreActiveDirectoryPath" value="GC://10.xxx.xx.xxx/DC=company,DC=com"/>

the code in my authentication page:

using (var searchRoot = new DirectoryEntry(_path, domUserName, password))
{
try
{
using (var searcher = new DirectorySearcher(searchRoot))
{
    searcher.Filter = "(SAMAccountName=" + username + ")";
    searcher.PropertiesToLoad.Add("cn");
    var result = searcher.FindOne();//---> am getting an exception here "server not operational"

The telnet to the Active Directory Server is working telnet 10.xxx.xx.xxx 3268

But am not getting authenticated.Plz help in this regard

1

There are 1 best solutions below

0
On

Can you just try the following as your LDAP connexion string (it works for me) :

"LDAP://10.xxx.xx.xxx:3268/DC=company,DC=com"