开发者

wcf message logging uploading files

开发者 https://www.devze.com 2023-03-11 20:09 出处:网络
I\'m sending files from clients to a server using WCF with different bindings. I need to know the sizes of the packets 开发者_开发知识库that the client send. How should I configure diagnostics in the

I'm sending files from clients to a server using WCF with different bindings. I need to know the sizes of the packets 开发者_开发知识库that the client send. How should I configure diagnostics in the config?? Or how can I view this?? Thanks.


To enable diagnostics, edit .config file

  <system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="sdt" type="System.Diagnostics.XmlWriterTraceListener" initializeData="App_Data\WCF.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

Then you can open .svclog file with Microsoft Service Trace Viewer

See also:

  • Configuring Tracing at MSDN
  • Administration and Diagnostics at MSDN
  • Configuring Message Logging at MSDN
0

精彩评论

暂无评论...
验证码 换一张
取 消