Resolving WebService/WCF call errors & quot; Protocol conflict submitted by the server. Section = ResponseStatusLine & quot;, wcfwebservice

Source: Internet
Author: User

Solve the WebService/WCF call error "protocol conflict. Section = ResponseStatusLine submitted by the server", wcfwebservice

Today, I updated a website, added a page, and called WebService. After the test environment is complete and deployed to the official environment, an error is returned:

The server submitted a protocol conflict. Section = ResponseStatusLine

I checked a lot of solutions on the Internet and added the configuration section:

<system.net>  <settings>    

However, there is no such thing!

By chance, I found the real cause.

I am continuously debugging in the development environment. I opened a new Session for IE and found that WebService cannot be accessed directly and is blocked by the proxy. WTF! Turn off the proxy. Now it is ready.

I used output. config generated by svcutil to embed it into my web. config. The ServiceModel in it is as follows:

<system.serviceModel>  <bindings>    <basicHttpBinding>      <binding name="xxx" closeTimeout="00:01:00" ...         useDefaultWebProxy="true">         ...

That is, useDefaultWebProxy = "true" enables him to automatically use the proxy. We can see what proxy is definitely set on the server, because this ws is accessed through a firewall policy across network segments, so it is automatically included in the proxy white list, however, the proxy cannot actually access this CIDR block, so the returned information is actually blocked by the Proxy:

<Html><Body><H1> 10.xx.xx.xx is prohibited by proxy.</H1></Body></Html>

It is no wonder that parsing errors have been delayed for a lot of time.

Both WebService and WCF will encounter similar problems. Write down to avoid forgetting.

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.