WCF spy on soap message

18/f/ny lookin.....  wait wrong website

Question is, in visual studio 2010 WCF, how to see the sent out SOAP requests, and responces.

Problem is the server is elsewhere and I want to know what I am sending




ive added this so fat but it doesnt look like the full SOAP being sent

    <system.diagnostics>
        <sources>
            <source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
                <listeners>
                    <add name="messages"
                    type="System.Diagnostics.XmlWriterTraceListener"
                    initializeData="C:\VS2010\Projects\DLL Client\bin\Debug\messages.svclog" />
                </listeners>
            </source>
        </sources>
    </system.diagnostics>


    <system.serviceModel>
                <diagnostics>
            <messageLogging
                 logEntireMessage="true"
                 logMalformedMessages="true"
                 logMessagesAtServiceLevel="true"
                 logMessagesAtTransportLevel="true"
                 maxMessagesToLog="3000"
                 maxSizeOfMessageToLog="2000"/>
        </diagnostics>

Open in new window

LVL 15
Ess KayEntrapenuerAsked:
Who is Participating?
 
Ess KayConnect With a Mentor EntrapenuerAuthor Commented:
i am sure i need something inside .net
WCF already has features for it, just dont know how to use correctly


i have this in my config file

<configuration>
    <system.diagnostics>
        <sources>
            <source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
                <listeners>
                    <add name="messages"
                    type="System.Diagnostics.XmlWriterTraceListener"
                    initializeData="C:\VS2010\Projects\ClientX\bin\Debug\messages.svclog" />
                </listeners>
            </source>
        </sources>
    </system.diagnostics>
...
</configuration>




it doesnt show me the real raw data

what else do i have to add for it
0
 
käµfm³d 👽Commented:
Have you considered using Fiddler or Wireshark? Depending on the complexity of the connection, either should allow you to see the data going over the wire.
0
 
Ess KayEntrapenuerAuthor Commented:
will it show me the inner message even though i have a secure transport layer encryption?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
käµfm³d 👽Commented:
That I'm not sure about, and that is what I was referring to with "the complexity of the connection."
0
 
Ess KayEntrapenuerAuthor Commented:
ive solved by doing the following
in the config file






 <system.diagnostics>
        <trace autoflush="true" />
        <sources>
            <source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
                <listeners>
                    <add name="messages"
                    type="System.Diagnostics.XmlWriterTraceListener"
                    initializeData="C:\VS2010\Client\bin\Debug\messages.svclog" />
                </listeners>
            </source>
            <source name="System.ServiceModel"
                    switchValue="Information, ActivityTracing"
                    propagateActivity="true">
                <listeners>
                    <add name="sdt"
                        type="System.Diagnostics.XmlWriterTraceListener"
                        initializeData= "SdrConfigExample.e2e" />
                </listeners>
            </source>
        </sources>
    </system.diagnostics>


   
           

 
   
    <system.serviceModel>
                <diagnostics>
            <messageLogging
                 logEntireMessage="true"
                 logMalformedMessages="true"
                 logMessagesAtServiceLevel="true"
                 logMessagesAtTransportLevel="true"
                 maxMessagesToLog="3000"
                 maxSizeOfMessageToLog="20000"/>  <!--to ensure large messages are logged changed from 2000-->
        </diagnostics>
0
 
Ess KayEntrapenuerAuthor Commented:
UPDATE: fiddler doesnt work/useless, as it hijacks the connection and the certificates dont get passed

so it gets rejected before the soap is even sent out
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.