none
Full SOAP envelope in WCF service log RRS feed

  • Question

  • Hello, I've enabled all the wcf tracing features but I cannot see the SOAP generated for my incoming/outgoing message (on net.tcp protocol binding).

    This is my configuration:

     

          <system.diagnostics>
    
    		<sources>
    			<source name="System.ServiceModel" switchValue="All" propagateActivity="true">
    				<listeners>
    					<add name="wcf" />
    				</listeners>
    			</source>
    			
    			<source name="System.IdentityModel">
    				<listeners>
    					<add name="wcf" />
    				</listeners>
    			</source>
    
    			<source name="System.MessageLogging">
    				<listeners>
    					<add name="wcf" />
    				</listeners>
    			</source>
    
    			<source name="System.Runtime.Serialization">
    				<listeners>
    					<add name="wcf" />
    				</listeners>
    			</source>
    		</sources>		
    
    		<sharedListeners>
    			<add name="wcf"
    				type="System.Diagnostics.XmlWriterTraceListener"
    				initializeData="wcf.svclog"
    		 />
    		</sharedListeners>
    
    	</system.diagnostics>
    

     

    .... and ....

     

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

    Could anybody say me where is the error?

     

    Thank you very much!

    Friday, August 27, 2010 2:34 PM

Answers

  • This one works for me. Alsoto be on the safe side give "everyone" full permission over the logging folder (just to see if it is working).

     

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

        <system.diagnostics>

            <sources>

                <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">

                    <listeners>

                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">

                            <filter type="" />

                        </add>

                        <add name="ServiceModelMessageLoggingListener">

                            <filter type="" />

                        </add>

                    </listeners>

                </source>

                <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"

                    propagateActivity="true">

                    <listeners>

                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">

                            <filter type="" />

                        </add>

                        <add name="ServiceModelTraceListener">

                            <filter type="" />

                        </add>

                    </listeners>

                </source>

            </sources>

            <sharedListeners>

                <add initializeData="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\App_3db3e196-5a35-4b0d-b4f1-062d042fbf09_messages.svclog"

                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

                    name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">

                    <filter type="" />

                </add>

                <add initializeData="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\App_3db3e196-5a35-4b0d-b4f1-062d042fbf09_tracelog.svclog"

                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

                    name="ServiceModelTraceListener" traceOutputOptions="Timestamp">

                    <filter type="" />

                </add>

            </sharedListeners>

            <trace autoflush="true" />

        </system.diagnostics>

        <system.serviceModel>

            <diagnostics>

                <messageLogging logEntireMessage="true" logMalformedMessages="true"

                    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />

            </diagnostics>

        </system.serviceModel>

    </configuration>


    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
    Friday, August 27, 2010 2:44 PM

All replies

  • This one works for me. Alsoto be on the safe side give "everyone" full permission over the logging folder (just to see if it is working).

     

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

        <system.diagnostics>

            <sources>

                <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">

                    <listeners>

                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">

                            <filter type="" />

                        </add>

                        <add name="ServiceModelMessageLoggingListener">

                            <filter type="" />

                        </add>

                    </listeners>

                </source>

                <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"

                    propagateActivity="true">

                    <listeners>

                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">

                            <filter type="" />

                        </add>

                        <add name="ServiceModelTraceListener">

                            <filter type="" />

                        </add>

                    </listeners>

                </source>

            </sources>

            <sharedListeners>

                <add initializeData="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\App_3db3e196-5a35-4b0d-b4f1-062d042fbf09_messages.svclog"

                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

                    name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">

                    <filter type="" />

                </add>

                <add initializeData="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\App_3db3e196-5a35-4b0d-b4f1-062d042fbf09_tracelog.svclog"

                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

                    name="ServiceModelTraceListener" traceOutputOptions="Timestamp">

                    <filter type="" />

                </add>

            </sharedListeners>

            <trace autoflush="true" />

        </system.diagnostics>

        <system.serviceModel>

            <diagnostics>

                <messageLogging logEntireMessage="true" logMalformedMessages="true"

                    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />

            </diagnostics>

        </system.serviceModel>

    </configuration>


    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
    Friday, August 27, 2010 2:44 PM
  • Thank you, Ill try it asap!
    Friday, August 27, 2010 3:58 PM
  • Thanks you!

    This configuration got me the full soap of all messages comming in and out

    Monday, February 11, 2013 3:54 PM