Resolve WCF "This may be due to a service endpoint binding not using the HTTP protocol, which may also be caused by the server aborting the HTTP request context (possibly due to service shutdown)" exception

Source: Internet
Author: User
Tags wsdl

Recently, the architecture of the system has been optimized to invoke WCF with the WinForm impersonation client, a bus from WCF that pushes the received message to each sub side.

It would have been simple to invoke the relationship, and after the WCF service was deployed to IIS, it had been reported that an error occurred while receiving the HTTP response to Http://lenovo-y460:8099/Service.svc. This may be due to the fact that the service endpoint bindings are not using the HTTP protocol. This may also be caused by the server aborting the HTTP request context (possibly due to a service shutdown). For more information, see Server logs. "Exception, as shown in the effect:


Exception, the exception is excluded by the control variable method.

The elimination process is as follows:

1. The Publish method invocation of the ESB, which is invoked by the client in the WCF debug state, proves that the push of the ESB is not a problem;

2. Use WinForm to invoke the test method of WCF deployed on IIS (does not include bus. Publish method) invocation succeeds, proving that the WCF service is no problem;

3. Calling the Bus.publish method call of WCF deployed on IIS with WinForm fails to report the above exception;

4. Invoke the bus in WCF debug state with WinForm . The Publish method call succeeded.

The final result (degree Niang said what class is not serialized, mercilessly put me in the hole): it is probably the cause of IIS.

Since WinForm can invoke the WSDL address in WCF Debug state, why can't I invoke the WSDL address that WCF deploys on IIS? Most likely because IIS has insufficient permissions, the solution is as follows:

IIS Manager--Application pool--Select target app pool--Advanced settings--process model----and custom account----Input native Administrator level user name, password, The configuration is as follows:


This bug was tuned for 3 days, and today it's settled, and it's a very fulfilling feeling.

I hope that my explanation can help you to improve.

Resolve WCF "This may be due to a service endpoint binding not using the HTTP protocol, which may also be caused by the server aborting the HTTP request context (possibly due to service shutdown)" exception

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.