The basic connection has been closed: the server submitted an HTTP protocol conflict.

Source: Internet
Author: User

The basic connection has been closed: the server submitted an HTTP protocol conflict.

This usually happens when we use the. net http component to access some Internet URL resources.
However
It is found that the use of WinHTTP encapsulation to read is no problem, normal return, but there is a managed native component but to use Com, always feel uncomfortable. But I don't know where the problem is? Feeling,
It must be the same as the http implementation of. net.CodeBecause the reading of COM components is normal for the same URL (the com era has been tested). However, not all URLs are similar.
Generally, some dynamic Asp.net pages have a high probability of failure.

 

Recently I finally found out that Microsoft has a kb discussion:

Http://forums.microsoft.com/MSDN/ShowPost.aspx? Postid = 296969 & siteid = 1

 

Specifically, add
<Configuration>

......
<System.net>
<Settings>
<Httpwebrequest useunsafeheaderparsing = "true"/>
</Settings>
</System.net>
</Configuration>

Original
The HTTP protocol may not end with CRLF. This is implemented strictly by. net.
When captured by HTTP components, the question is wrong. In fact, HTTP components in most of the com era can be ignored. To make. net
And overwrite the system's machine. config default settings.

Capital-based ICP filing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.