Using trace log to make errors in WCF applications

Source: Internet
Author: User
Tags config

Objective

As WCF is more and more applied to the actual system, its advantages are increasingly accepted by everyone. However, as a typical distributed application, WCF also has the inherent disadvantage of distributed application, that is, development and maintenance are relatively complex. Especially in the area of troubleshooting, it is much more complicated than the non-distributed program. So how can you more effectively troubleshoot the errors that occur in WCF? This will have to refer to the WCF trace log feature. This article will talk about the application of trace log in the example of a WCF service with IIS 6.0 as host.

Before you start, get acquainted with two friends: SvcConfigEditor and Svctraceviewer.

"SvcConfigEditor": A tool provided by Microsoft to assist in editing WCF configuration files. (You can, of course, edit the config file directly, but it's easier with the tools.) )

"Svctraceviewer": A tool provided by Microsoft to view the WCF trace log.

All two of their paths are C:\Program Files\Microsoft Sdks\windows\v6.0a\bin.

Configure config file to enable trace Log

Starting SvcConfigEditor.exe, you can see the following interface:

Open the Config file you want to edit by using File-> open-> config files. (web. Config file), select the Diagnostics node and display the following:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.