监控领域中连接状态状态、领域

由网友(使劲爱可劲闹)分享简介:有没有什么办法来监视域的可用性,当服务器在运行时是未知的? NetworkChange.NetworkAvailabilityChanged ,不跨框架版本/操作系统提供一致的结果。Is there any way to monitor the availability of a domain, when the...

有没有什么办法来监视域的可用性,当服务器在运行时是未知的? NetworkChange.NetworkAvailabilityChanged ,不跨框架版本/操作系统提供一致的结果。

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.

我用移动设备上的域名,这将要持续减肥和重新获取域连接处理;我需要检测code,当这一切发生。

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.

我尝试过谷歌,必应和MSDN并拿出什么。

I've tried Google, Bing, and MSDN and come up with nothing.

推荐答案

尝试使用P / Invoke的 NetWkstaUserGetInfo

Try using p/Invoke NetWkstaUserGetInfo

System.Environment.UserDomainName 从获取数据环境变量中。

System.Environment.UserDomainName gets data from environment variable.

阅读全文

相关推荐

最新文章