wcf message logging uploading files
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
精彩评论