wcf - 需要帮助了解 Microsoft Service Trace Viewer 日志

标签 wcf web-services svctraceviewer

我正在使用 Microsoft Service Trace Viewer 检查日志中的异常。异常(exception)是:

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 服务已启动并正在运行,我可以正常访问它。我正在使用来自同一个网络服务的方法生成多个报告,除了一个之外,其他都很好。 (这个报告有很多数据)。我猜这与返回太多数据/超时有关,但我如何使用 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>

请帮忙,我真的不知道这里...

最佳答案

要尝试获取更具体的错误,请在客户端和服务上启用跟踪,请参阅下面的链接以获取更多信息。获得 .svclog 文件后,使用跟踪查看器打开它并单击以红色突出显示的任何事件以查看详细信息 - 如果您超过 WCF 限制(例如 MaxReceivedMessageSize),它应该出现在客户端或服务的日志中。

http://msdn.microsoft.com/en-us/library/ms733025.aspx

How to turn on WCF tracing?

关于wcf - 需要帮助了解 Microsoft Service Trace Viewer 日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13379336/

相关文章:

wcf - 如何续订 iis7 自签名 ssl 证书

WCF REST 服务端点未找到 WebInvoke 错误

WCF 仅跟踪失败的请求?

android - 从 Webservice 下载和查看 Android 应用程序中的 PDF

asp.net - 方法 'XYZ'无法反射(reflect)

log4net - 使用 log4net 创建可以使用 SvcTraceViewer.exe 查看的日志文件

c# - 在业务层中使用 [DataContract] 标记类是一个糟糕的设计吗?

wcf - 在IIS/WAS中托管的非HTTP WCF服务中初始化代码的正确位置?

java - 使用 JSON Web 服务的有效方法?