我有2个问题要问你。
我正在创建一个依赖于Jabber的聊天应用程序,女巫是我的服务器端口5222用于服务器方面。
如何通过端口5222 ping服务器并检查它是否打开并响应。
像Ping.Once(Settings.Defualt.ChatServerDomain,Settings.Defualt.ChatServerPort);
在我的工作中,由于我们运行的代理服务器,我的应用程序无法登录,在IE中,您可以设置代理设置,允许所有常规应用程序连接,但我的应用程序不使用这些设置。
所以我需要做的是创建一个小的检查器,看看是否在代理服务器后面,如果我们显示一个窗口来验证用户凭据。并且还将应用程序绑定到它们凭据,以便在应用程序打开期间对任何请求进行身份验证。
这就是我在编码术语中的意思
if(ProxyAuthRequired())
{
ProxyAuthWindow ProxyAuthWindow = new ProxyAuthWindow();
CurrentWindow.Enable = false;
/*
* Within the Form ProxyAuthWindow, This will callback to my main controller after
* The auth is checked and ok, This is what i do not know how to do
*/
ProxyAuthWindow.Show(); //Ask for the credentials and check the port inside here
}