Title: Message logging and tracing - WCF - Lesson 11
Duration: 24 minutes
Summary: In this video, we need to discuss message logging and tracing. We start with the MathService that we created previously. In this service we created two simple methods for Multiplying and Moding two numbers. We created a console host to host the service, and a client to call the methods in the service. In order to turn message tracing and logging we use the App.config on the service side and the client side. We can edit the config file by hand, but it is easier to use the configuration editor. In the configuration editor, we use the diagnostics section. We turn message logging and tracing on and specify the log levels and the log files (with extension .svclog). We run the client and make some calls to the service. After we exit out, we show all files in the solution. Couple of those files (on the client and the service) have .svclog extension. We open those files using the trace viewer. The tool name is SvcTraceViewer.exe. When we open the files using the tool, we are able to see all the messages that were exchanged between the client and the service.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: Windows Communication Foundation.
Keywords: Windows Communication Foundation (WCF), ServiceContract, DataContract, Endpoint, Address, Binding, Contract, Service, Interface, class, Host, Client, Config.