This question似乎非常接近我所尋找的 - 我能夠設置跟蹤,我正在查看我的服務調用的日誌條目。如何攔截來自WCF客戶端的原始SOAP請求/響應(數據)
然而,我需要看到原始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>
任何幫助表示讚賞!
UPDATE:這是我在我的跟蹤看:
<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>
tnx幫助 - 更新問題以顯示我在xml中看到的內容。沒有信封!我是否缺少配置文件? – JohnIdol 2010-05-10 13:21:27
此外,我似乎有不同版本的svctraceviewer - xml選項卡旁邊的消息選項卡不顯示 – JohnIdol 2010-05-10 13:33:39
@JohnIdol:您使用哪種綁定? – 2010-05-10 14:32:19