HTTPERR log: Request_Cancelled (while troubleshooting WCF service)

最后都变了- 提交于 2019-12-04 17:00:52

Request_cancelled might be a timeout.

By default it should be

OpenTimeout - 1 minute
CloseTimeout - 1 minute
SendTimeOut - 1 minute
ReceiveTimeout - 10 minute.

Try set these settings in your web.config. It will add further logging to your web service.

At your system.serviceModel section

<system.serviceModel>

....

    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" />
    </diagnostics>     

....
</system.serviceModel>

and add system.diagnostics section. It will save a log to 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>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!