When I unplug the Ethernet cable of one of the Active Directory servers, my application fails to authenticate user, despite there is a different Active Directory server is available on the network. Why is that? I expect that if one of the Active Directory servers fails, the other ones can handle requests.
I use Windows Server 2008 R2 64-bit.
I have an IIS application which authenticates users against an Active Directory.
string serverName = ConfigurationManager.AppSettings["AD.Server"];
string userName = ConfigurationManager.AppSettings["AD.User"];
string password = ConfigurationManager.AppSettings["AD.Password"];
_principalContext = new PrincipalContext(ContextType.Domain, serverName, userName, password);
Here are the configuration settings:
<add key="AD.Server" value="192.168.0.1"/> <!--- THIS IS THE PRIMARY PRODUCTION SERVER -->
<add key="AD.User" value="Domain\Administrator"/>
<add key="AD.Password" value="******"/>
Then I set up another Active Directory server (let it be 192.168.0.2). It successfully syncs with the production server. Later, when I switch the second AD server off, my application fails with exception "The server is not operational".
Why is that? Why does the application depend on the second server, despite being explicitly given another server in config?