如何在 .NET Compact Framework 上使用 SSL(安全套接字层)连接到服务器

发布于 2024-08-27 10:00:08 字数 1301 浏览 3 评论 0原文

我想将 .NET Framework v3.5 更改为 .NET Compact Framework v3.5。 但我无法将 SSL Stream 类更改为紧凑框架版本。 为了解决这个问题,我已经阅读了一些文章和msdn库。

http://blogs.msdn.com/cgarcia/archive/2009/08/21/enable-ssl-for-management-socket-on-windows-mobile.aspx

http://blogs.msdn.com/cgarcia /archive/2009/08/22/getting-a-management-socket-to-talk-ssl.aspx

http://msdn.microsoft.com/en-us/library/aa916117.aspx

但在调用“socket”时出现“未知错误 0x0ffffff”错误.connect(endPoint)' 方法基于这篇文章。 为了找到正确的方法,我尝试使用 TcpClient 类。但我无法解决这个问题。

当我尝试连接到 .NET 紧凑框架上的服务器时,TcpClient 类不起作用(智能设备项目和 Windows CE)。 正如您在下面看到的,我遇到了错误。另一方面,此代码适用于 .NET 框架(C# 控制台项目)。

我不明白为什么这个套接字无法访问服务器。

替代文字

alt text

感谢您阅读我的问题。

I want to change .NET framework v3.5 to .NET compact framework v3.5.
But I can't change SSL Stream class to compact framework version.
For resolving this problem, I already read some article and msdn library.

http://blogs.msdn.com/cgarcia/archive/2009/08/21/enable-ssl-for-managed-socket-on-windows-mobile.aspx

http://blogs.msdn.com/cgarcia/archive/2009/08/22/getting-a-managed-socket-to-talk-ssl.aspx

http://msdn.microsoft.com/en-us/library/aa916117.aspx

but I got an error that is "Unkown error 0x0ffffff", when invoking 'socket.connect(endPoint)' method based on thease article.
In order to find the proper method, I try to use TcpClient class. but i can't solve this problem.

When I try to connect to server on .NET compact framework, TcpClient class didn't work(Smart Device project and windows ce).
As you can see below, I've got the error. In other hand, this code is work on .NET framework(C# console project).

I can't understand why this socket can not access to server.

alt text

alt text

Thanks for reading my question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文