How can I determine if the DC is available???

From: Anthony Yott (anthonyyott_at_hotmail.com)
Date: 08/05/05

  • Next message: Daniel: "does C# have any collection objects that support sort functionality so that I dont have to write my own sorting algorithm?"
    Date: Fri, 5 Aug 2005 09:12:07 -0700
    
    

    We are currently using SSPI to authenticate our users to the domain (see
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;180548) in our
    application. We can't use LogonUser because we have to support Win 2000.

    We need to be able to determine if the domain controller(s) is unavailable
    (ie either the client's network cable is unplugged or they are not logged
    into the domain). In the SSPI code we have code to check the last error
    (e.g.. GetLastError) if the call fails. When testing this code, my co-worker
    gets the following message when his network cable is unplugged:

    “There are currently no logon servers available to service the logon
    request.” DWORD = 0x0000051f

    However when I unplug my cable I get a different error as follows:

    “Logon failure: unknown user name or bad password.” DWORD = 0x0000052E

    We are both using Win XP SP2.

    Can anyone offer an opinion as to why there is a difference or is there a
    "best practice" for determining whether I can reach the domain server(s)?

    Any help here would be greatly appreciated.

    Thanks in advance,

    -- 
    Anthony Yott
    

  • Next message: Daniel: "does C# have any collection objects that support sort functionality so that I dont have to write my own sorting algorithm?"

    Relevant Pages

    • Determine if DC is available for Offline work question
      ... We are currently using SSPI to authenticate our users to the domain (see ... “There are currently no logon servers available to service the logon ... However when I unplug my cable I get a different error as follows: ... unknown user name or bad password.” DWORD = 0x0000052E ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Need Help. Determining Domain Connectivity
      ... We are currently using SSPI to authenticate our users to the domain (see ... We can't use LogonUser because we have to support Win 2000. ... “There are currently no logon servers available to service the logon ... However when I unplug my cable I get a different error as follows: ...
      (microsoft.public.win32.programmer.networks)