Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

WCF spy on soap message

Posted on 2012-08-14
6
Medium Priority
?
1,411 Views
Last Modified: 2012-10-02
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

0
Comment
Question by:Ess Kay
  • 4
  • 2
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38293954
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
 
LVL 15

Author Comment

by:Ess Kay
ID: 38294309
will it show me the inner message even though i have a secure transport layer encryption?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38294749
That I'm not sure about, and that is what I was referring to with "the complexity of the connection."
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 15

Accepted Solution

by:
Ess Kay earned 0 total points
ID: 38297224
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
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 38315479
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
 
LVL 15

Author Comment

by:Ess Kay
ID: 38456396
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question