如何检查PPC与WebService之间的连接?
如何检查 PPC 与服务器上的 Web 服务之间的连接?我在 FW3.5 C# 上工作
How do I check the connection between PPC and a web service on the server? I work on FW3.5 C#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我记不清这是否在 .Net CF 中可用:
System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged
另一种选择是尝试使用 Web 服务并处理异常。我通常遵循这种模式,有什么原因它不适用于您的情况吗?
编辑:
连接监视器类:
我的 Win32 静态类中有很多调用(与您的需求无关)。以下是我认为您需要的所有内容:
如果我错过了任何内容,请在 pinvoke.net 上查找。
I can't remember offhand if this is available in .Net CF or not:
System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged
Another option is to just attempt to use the web service, and handle exceptions. I usually follow this pattern, is there a reason it doesn't work for your case?
Edit:
Connection Monitor class:
My Win32 static class had a lot of calls (unrelated to your needs) in it. Here are all the ones I think you need:
If I missed any, look them up on pinvoke.net.