在 C# 中通过 TcpClient 套接字发送 SSL HTTP 请求
我面临的问题是我必须通过 TcpClient 套接字检索网站内容(由于其他一些问题,我无法使用 HttpWebRequest 和 HttpWebResponse)。我可以使用 HTTP 协议成功请求 Web 服务器。但有些网站只接受 HTTP SSL 请求,而不接受 HTTP。 我的问题是:如何向主机服务器发送 HTTP SSL 请求并检索内容?
任何建议都非常感激。
谢谢并致以诚挚的问候
I am facing a problem that I must retrieve a website content via a TcpClient socket (I cannot use HttpWebRequest as well as HttpWebResponse because some other issues). I can successfully request to web server using HTTP protocol. But there some webs only accept HTTP SSL request, not the HTTP.
My question is: How can I send HTTP SSL request to the host server and retrieve back the content?
Any advices are really appreciated.
Thanks and best regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查这个安全套接字库和这个安全套接字库。 mentalis.org/soft/projects/seclib/docs/Org.Mentalis.Security.Ssl.SecureTcpClient.html" rel="nofollow">类
Check this Secure Socket Library and this class
.NET 框架中的 SslStream 类,或者如果您需要高级功能和完整的功能,请使用我公司维护的 SecureBlackbox 的 SSL/TLS 组件控制。
SslStream class in .NET framework, or the SSL/TLS components of SecureBlackbox, which my company maintains, if you need advanced functionality and complete control.