Blog Home  Home Feed your aggregator (RSS 2.0)  
Scott Klueppel's Blog - DevTools
.NET Discourse
 
# Wednesday, June 18, 2008

Juval Löwy mentioned the Microsoft Service Trace Viewer in a webcast today. If you ever wondered exactly what WCF does under all of those covers, check this out.

First things first. Enable tracing on the client and host applications using the WCF Configuration Editor. Enable the verbose trace level and check all of the listener settings. This will add all of the necessary <system.diagnostics> settings in your config file. The next time you start each of the applications, a .svclog file will be created that will be used by the Service Trace Viewer.

Start your host, start your client, run through the test cases that you want to analyze in the viewer. After your test run is complete, open the viewer, located at C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcTraceViewer.exe. "Open" the host.svclog file, and then "Add" the client.svclog file. Both "Open" and "Add" are menu items under "File".

Start on the Activity tab, look through the host and client activities that occurred. Everything from ServiceHost construction through ServiceHost closing shows up. This is very cool, especially when analyzing the differences between different security, session, and reliability settings.

When you are done looking through the activities, check out the Graph tab. Here you can look at the interactions between the client and host, as well as looking at the details of each activity (at the top right). At the bottom right, you will also notice the formatted and xml details of this activity.

This is a very cool tool for both debugging and training. Below is my lame test projects, if you want to skip past the configuration and check out the tool. My .svclog files are located in the Client and Host folders.

SvtTest.zip (190.32 KB)

Enjoy! Thanks to Juval for the direction.

Wednesday, June 18, 2008 9:23:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments   .NET Framework | C# | Dev Tools | Visual Studio | WCF  | 
# Thursday, May 29, 2008

I have been using ScottGu's Visual Studio 2008 theme for the last few weeks and love it. You can see it here and download it here.

Thursday, May 29, 2008 9:21:53 PM (Eastern Standard Time, UTC-05:00)  #    Comments   Dev Tools | Visual Studio  | 
Copyright © 2008 Scott Klueppel. All rights reserved.