有时使用HttpWebRequest对象会出现错误,总结有三种:
1、System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine
2、System.Net.WebException: 基础连接已经关闭: 连接被意外关闭。
3、System.Net.ProtocolViolationExcepti
使用TcpClient对象搞定:
private string GetHTMLTCP(string URL)
本文介绍了解决使用HttpWebRequest对象时可能遇到的三种常见错误,并提供了一种使用TcpClient对象替代的方法来获取网页内容。
有时使用HttpWebRequest对象会出现错误,总结有三种:
1、System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine
2、System.Net.WebException: 基础连接已经关闭: 连接被意外关闭。
3、System.Net.ProtocolViolationExcepti
使用TcpClient对象搞定:
private string GetHTMLTCP(string URL)

被折叠的 条评论
为什么被折叠?