Is there any way to monitor the availability of a domain, when the server is unknown at runtime? NetworkChange.NetworkAvailabilityChanged
, does not provide consistent results across framework versions/operating systems.
I'm dealing with mobile units on a domain, that are going to consistently lose and re-acquire domain connectivity; and I need to detect in code, when this happens.
I've tried Google, Bing, and MSDN and come up with nothing.
Try using p/Invoke NetWkstaUserGetInfo
System.Environment.UserDomainName gets data from environment variable.
You mean like the
System.Environment.UserDomainName
property?