简体   繁体   中英

WCF Communication Exception

An error occurred while receiving the HTTP response to http://production/Services/AccountService.svc . This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

What could be the reason for this exception? I have exception details enabled on my ASP.NET site web.config file, where I host the WCF service.

I have a second service that's just for testing purposes that just returns an int, which works flawlessly.

Also, in development, meaning both the consuming and the service application are on the same local computer, both services work. Which makes testing for this error that much harder :(

Any advice as to how to debug in this particular situation?

I feel your pain with WCF's lack of useful exception detail. What you need to do is enable tracing which provides in-depth debugging information.

Have a look at the Recommended Settings for Tracing and Message Logging on MSDN...

I had that sort of error when I tried to send large data structures over a webservice. The type being marked as [Serializable] , it passed compilation of the WCF web service and the corresponding client without problems. I removed that type, and it would answer just fine.

From what I see this is client site error. Looks like your WCF service failed and did not responded to the client, and client gave you this error message. Check your trace on the server side. Also if this is long running task change your sendTimeout to longer time. I think by default it is 30 or 60 seconds, so if your process running more than that you will have this type of error.

Hope this will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM