- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试对访问 WCF 自承载服务的 WCF 客户端上的“连接被远程主机强行关闭”错误进行故障排除。我在服务端机器上查看 System32\LogFiles\HTTPERR 中的 httperr 日志,每次在我的客户端上看到该错误时,我都会在日志中看到带有我的服务端点 URI 的条目。原因是“Request_Cancelled”。
我在任何地方都找不到关于这个原因意味着什么的任何信息。我可以猜到,但我想确定地知道,因为它一定与我在客户端中看到的错误有某种关系。
HTTPERR 日志中的“Request_Cancelled”是什么?作为奖励,您能否进一步说明我的 WCF 问题?
最佳答案
Request_cancelled 可能超时。
默认应该是
OpenTimeout - 1 minute
CloseTimeout - 1 minute
SendTimeOut - 1 minute
ReceiveTimeout - 10 minute.
尝试在您的 web.config 中设置这些设置。它将向您的 Web 服务添加更多日志记录。
在您的 system.serviceModel 部分
<system.serviceModel>
....
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" />
</diagnostics>
....
</system.serviceModel>
并添加 system.diagnostics 部分。它会将日志保存到 c:\temp\wcfServiceLog.svc
<system.diagnostics>
<switches>
<add name="XmlSerialization.Compilation" value="4"/>
</switches>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\temp\wcfServiceLog.svc" />
</sharedListeners>
</system.diagnostics>
关于c# - HTTPERR 日志 : Request_Cancelled (while troubleshooting WCF service),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27725258/
我正在尝试对访问 WCF 自承载服务的 WCF 客户端上的“连接被远程主机强行关闭”错误进行故障排除。我在服务端机器上查看 System32\LogFiles\HTTPERR 中的 httperr 日
我们正在尝试找出为什么对特定端点(http 或 https)的后台请求永远不会到达 IIS。 IIS 日志显示来 self 们设备的其他请求,但没有显示来自后台请求的请求。它们确实显示在 HTTP.S
我是一名优秀的程序员,十分优秀!