System.ServiceModel.CommunicationException: An error occurred while receiving an HTTP response

Source: Internet
Author: User
Tags stack trace

The specific error message is as follows:

System.ServiceModel.CommunicationException: An error occurred while receiving an HTTP response to Http://110.110.110.110/TestService/TestService.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. ---> System.Net.WebException: The underlying connection has been closed: An error occurred while receiving. ---> System.IO.IOException: Unable to read data from the transport connection: the remote host forced the shutdown of an existing connection.   ---> System.Net.Sockets.SocketException: The remote host forced the shutdown of an existing connection. In System.Net.Sockets.Socket.Receive (byte[] buffer, Int32 offset, Int32 size, SocketFlags SocketFlags) in System.Net.Socke Ts. Networkstream.read (byte[] buffer, Int32 offset, Int32 size)---the end of the inner exception stack trace---in System.Net.Sockets.NetworkStream.Rea D (byte[] buffer, Int32 offset, Int32 size) in System.Net.PooledStream.Read (byte[] buffer, Int32 offset, Int32 size) in S Ystem. Net.Connection.SyncRead (HttpWebRequest request, Boolean Userretrievedstream, Boolean proberead)---the end of the inner exception stack trace--- System.Net.HttpWebRequest.GetResponse () in System.ServiceModel.Channels.HttpChannelFactory ' 1. Httprequestchannel.httpchannelreqUest. Waitforreply (TimeSpan timeout)---the end of the internal exception stack trace---the Server stack trace: in System.ServiceModel.Channels.HttpChannelUtili Ties. Processgetresponsewebexception (WebException WebException, HttpWebRequest request, Httpabortreason AbortReason) in System.ServiceModel.Channels.HttpChannelFactory ' 1.httprequestchannel.httpchannelrequest.waitforreply (TimeSpan Timeout) at System.ServiceModel.Channels.RequestChannel.Request (Message message, TimeSpan timeout) in System.servicemod El. Dispatcher.RequestChannelBinder.Request (Message message, TimeSpan timeout) in System.ServiceModel.Channels.ServiceChannel.Call (String action, Boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, TimeSpan timeout) in System.ServiceModel.Channels.ServiceChannelProxy.InvokeService ( IMethodCallMessage Methodcall, proxyoperationruntime operation) in System.ServiceModel.Channels.ServiceChannelProxy.Invoke (IMessage message) Exception rethrown at [0]: System.Runtime.Remoting.Proxies.RealProxY.handlereturnmessage (IMessage reqmsg, IMessage retmsg) in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke ( messagedata& msgdata, Int32 type)//Partial error function information hint

Cause of Error:

Passing a DataTable through WCF

Solve:

The DataTable passed in WCF is replaced with a dataset (verified)

or (not verified)

Photo Data Source: Click to open the link


System.ServiceModel.CommunicationException: An error occurred while receiving an HTTP response

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.