Reputation: 2957
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.
Upvotes: 1
Views: 437
Reputation: 3638
Try using p/Invoke NetWkstaUserGetInfo
System.Environment.UserDomainName gets data from environment variable.
Upvotes: 2
Reputation: 151594
You mean like the System.Environment.UserDomainName
property?
Upvotes: 0