This blog is about developing Windows applications using Visual Studio. All postings on this weblog are provided "AS IS" with no warranties, and confer no rights. Use of any samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Your host Nikola Dudar is a Program Manager in Windows division of Microsoft Corporation. He has been working on Windows Web Services API during Windows 7 and various additions to Visual C++ during VS2005 and VS2008. More details are in LinkedIn profile under Nikola's formal name Mykola Dudar.
If you are interested in program management and project management, check out my other blog at http://www.pmsnack.com/ where I collect best practices and other topics interesting to program and project managers.
To send feedback, comments or requests for new posts, please use the contact form.
Tracing in Windows Web Services uses Event Tracing to let you know about what happens inside the WWS runtime after your code calls into the API. Tracing is available on all versions of Windows we support (XP, Vista, 2003, 2008 and 7). In case of Windows 7, once you install Windows 7 Release Candidate and Windows SDK for Windows 7 RC, you can use tracing to troubleshoot communication issues in your applications that use WWS. Traces are logged for major events like entry and exit into Ws*() function; any runtime errors including SOAP faults; start and completion of any I/O and SOAP messages sent and received (not available on Windows XP). There are three levels of tracing. In verbose mode, the runtime saves traces for all events. In Info mode, it only saves informational traces such as start and completion of I/O. In error mode, only errors are logged. Windows SDK for Windows 7 RC contains a batch script called wstrace.bat. This batch file provides a convenient way to:
A typical sequence of commands for collecting traces is as follows:
1. Run Windows SDK CMD Prompt as administrator.
2. To create trace log run the following command. The third parameter indicates the mode of tracing you are going to use. In the example below, I set Verbose mode.
> wstrace.bat create verbose
3. Enable tracing
> wstrace.bat on
4. Start dumping of tracing messages to a file
> wstrace.bat dump > C:\Temp\wwstraces.csv
5. Switch to your application and run your scenario
6. Switch to the command prompt and press Ctrl+C. This should stop tracing and wstrace batch file
7. Turn off tracing
> wstrace.bat off
8. Delete tracing log
> wstrace.bat delete
Once you are done, you can open .csv file in Excell. Each event trace is saved in one row. You can sort by process ID to separate events from different clients and services. The logs are usually self-explanatory and they should point out the root cause of an issue.
To learn more about tracing options available to you, run wstrace.bat without any commands. It will print out all different options supported by the tracing. Check out this section in MSDN documentation for more details on tracing and commands for wstrace.bat. Try it out and if you have any feedback, please leave comments or ask questions on the forum.
PingBack from http://microsoft-sharepoint.simplynetdev.com/how-to-use-tracing-with-the-rc-version-of-windows-web-services/