You are on page 1of 3

Configuring Tracing

1. Edit web.config in Portal and Webservices


You can configure tracing by editing the applications configuration fileeither Web.config
for Web-hosted application.
Create a log folder in C drive.
<configuration>

<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing, Error"
propagateActivity="true">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="CardSpace">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.IO.Log">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.Runtime.Serialization">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.IdentityModel">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\log\Traces.svclog" />
</sharedListeners>
</system.diagnostics>
</configuration>

In addition, you can add level to trace sources, above sample is: Information,
ActivityTracing, Error
Reference:

http://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx

2. Check log
After running your application, open log folder and you can see like as:

Check the during time to a request process.

When you double click on an activity on left panel, you see like

You might also like