MSNP-Sharp 示例无法登录,给出 SocketException
我刚刚下载了 MSNP-Sharp 库,目的是创建自己的消息客户端,但是我很难让示例登录。代码全部编译并运行,但是当我提供登录详细信息并选择“登录”时“我几乎立即得到以下 SocketException:
“无法建立连接,因为目标机器主动拒绝它 64.4.9.254:1863”
我已经逐句查看了代码,很明显,是Messenger.Connect() 函数导致了这种情况。当我运行该示例时,我仅更改登录名和密码详细信息。我运行的是 Windows 7 x86 和最新版本的 Windows Live Messenger。
我尝试过禁用防病毒软件,甚至暂时卸载它,以防出现错误。
我也尝试过禁用 Windows 防火墙,但没有成功。
I've just downloaded the MSNP-Sharp library with the aim of creating my own messaging client, however I am struggling to get the example to sign in. The code all compiles and runs, but when I provide my login details and select "Login" I almost immediately get the following SocketException:
"No connection could be made because the target machine actively refused it 64.4.9.254:1863"
I've stepped through the code and it's the messenger.Connect() function that is causing this, somewhat obviously. When I run the example I only change the login and password details. I am running Windows 7 x86 with the latest version of Windows Live Messenger.
I have tried disabling my antivirus, even going as far as to temporarily uninstall it in case that was the error.
I have also tried disabling Windows Firewall, with no luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,使用MSNPSharp的稳定版本(即3.0)。由于它是 SocketException,因此这可能与互联网协议中的问题(例如防火墙)有关。尝试确保没有任何东西阻止程序访问 MSN 协议。既然你说你已经禁用了 Windows 防火墙,是否还有其他东西可以阻止它?
其次,您是否尝试过使用MSN Messenger Live进行测试。如果有效,MSNPSharp 客户端也应该可以工作。确保您拥有 .NET Framework 2.0 或相应版本的 .NET Framework。如果它总是出现问题,我不认为这是 MSNPSharp 客户端的问题(但我不确定)。
Firstly, use the stable version of MSNPSharp (that is, 3.0). Since it is a SocketException, this may relate to a problem within the internet protocol (a firewall for instance). Try to ensure that nothing is blocking the program from accessing to the MSN protocol. Since you have said you have disabled your Windows Firewall, could there be anything else that could be blocking it?
Secondly, have you tried using MSN Messenger Live for a test. If that works, MSNPSharp client should probably work too. Ensure you have .NET Framework 2.0 or within their version of the .NET Framework. If it constantly appears to be a problem, I don't believe this is a problem from the MSNPSharp client (I'm not sure however).
这是一个演示,我希望它有用
here is a demo,i hope it would be useful
您是否尝试过 MSNPSharp 的示例客户端?
Have you tried the example client for MSNPSharp?