This question似乎非常接近我正在寻找的 – 我能够设置跟踪,我正在查看日志条目我的电话服务.
然而,我需要看到原始soap请求与我发送到服务的数据,我看到没有办法从SvcTraceViewer(仅显示日志条目,但没有数据发送到服务) – 我只是缺少配置?
这是我在web.config中所得到的:
<system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Verbose" propagateActivity="true"> <listeners> <add name="sdt" type="System.Diagnostics.XmlWriterTraceListener" initializeData="App_Data/Logs/WCFTrace.svclog" /> </listeners> </source> </sources> </system.diagnostics>
任何帮助赞赏!
更新:这是我在跟踪中看到的全部:
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <EventID>262163</EventID> <Type>3</Type> <SubType Name="Information">0</SubType> <Level>8</Level> <TimeCreated SystemTime="2010-05-10T13:10:46.6713553Z" /> <Source Name="System.ServiceModel" /> <Correlation ActivityID="{00000000-0000-0000-1501-0080000000f6}" /> <Execution ProcessName="w3wp" ProcessID="3492" ThreadID="23" /> <Channel /> <Computer>MY_COMPUTER_NAME</Computer> </System> <ApplicationData> <TraceData> <DataItem> <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information"> <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Channels.MessageSent.aspx</TraceIdentifier> <Description>Sent a message over a channel.</Description> <AppDomain>MY_DOMAIN</AppDomain> <Source>System.ServiceModel.Channels.HttpOutput+WebRequestHttpOutput/50416815</Source> <ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord"> <MessageProperties> <Encoder>text/xml; charset=utf-8</Encoder> <AllowOutputBatching>False</AllowOutputBatching> <Via>http://xxx.xx.xxx.xxx:9080/MyWebService/myService</Via> </MessageProperties> <MessageHeaders></MessageHeaders> </ExtendedData> </TraceRecord> </DataItem> </TraceData> </ApplicationData>
解决方法
您没有仅显示SOAP消息的特定选项卡 – 但是XML标签确实包含整个SOAP消息 – 否?
alt text http://i39.tinypic.com/j67rf7.jpg
这里的XML片段缺少什么?
更新:约翰,您不幸没有显示您的< system.serviceModel> /< diagnostics>部分看起来像我用于这个结果的样子如下所示:
<diagnostics> <messageLogging logMessagesAtTransportLevel="true" logMessagesAtServiceLevel="false" logMalformedMessages="true" logEntireMessage="true" maxSizeOfMessageToLog="65535000" maxMessagesToLog="500" /> </diagnostics>
你有相同的设置吗?也许你缺少logEntireMessage或其他东西?