Monitoring Domain Connectivity Status

孤街浪徒 提交于 2019-12-11 09:46:02

问题


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.


回答1:


Try using p/Invoke NetWkstaUserGetInfo

System.Environment.UserDomainName gets data from environment variable.




回答2:


You mean like the System.Environment.UserDomainName property?



来源:https://stackoverflow.com/questions/7755701/monitoring-domain-connectivity-status

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!