我正在使用Microsoft服务跟踪查看器检查日志以查找异常。例外是:需要帮助了解Microsoft服务跟踪查看器日志
An error occurred while receiving the HTTP response to ...someservice.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.
该web服务已启动并运行,我可以达到它的罚款。我使用来自同一web服务的方法生成了几个报告,除了一个以外,一切都很好。 (这份报告有很多数据)。我猜它与返回太多的数据/超时有关,但我如何使用Microsoft Service Trace Viewer来检查这个问题? (我是这个工具的新手)。
这是我的异常字符串:
<ExceptionString>System.ServiceModel.CommunicationException: An error occurred
while receiving the HTTP response to http://someservice.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. --->
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive. --->
System.IO.IOException: Unable to read data from the transport connection: An
existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly
closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---</ExceptionString>
请帮帮忙,我真的来到这里不知道......
感谢您的回答。 我刚刚拿到了很多更多数据的som dbtables,并设法重现崩溃。这似乎与MaxReceivedMessageSize有关,但是从日志中我不确定如何验证这一点。我已经使用配置扩展了日志记录。从我的app.config中“如何打开wcf跟踪”,但我仍然看不到日志中的任何消息,说我已经超过了MaxReceivedMessageSize。我是否还需要将日志记录添加到web.config文件中? – user1823747
是的,添加跟踪web.config,因为它可能是服务器端的错误。 –