Tracing in Visual Studio 2005 & ASP.NET 2.0 web services...

R

Roger Down

I am in the process of converting some of my old .NET 1.1 web services to
version 2.0, but I have run into several problems.

The first problem was overcome by installing the "Visual Studio 2005 Web
Application Projects". This was done due to several issues with the new
compiling model. So I'm using the "old" compiling model in VS 2005.

The next problem is tracing related. This is what my web.config file looks
like in a working VS 2003 solution...:

<configuration>
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="MyEventListener"
type="System.Diagnostics.EventLogTraceListener" initializeData="My Event
Tracer" />
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
<switches>
<add name="MySwitch" value="4"/>
</switches>
</system.diagnostics>
<system.web>
<customErrors mode="Off"/>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
<appSettings>
<add key="Test" value="Key"/>
</appSettings>
</configuration>

The above configuration enables me to use Trace.WriteLine in various parts
of the code, and all output is written to eventlog to a registered event
source called "My Event Tracer".

Using the same web.config file in a .NET 2.0 project, no output is written
to event log. The trace switch seems to be working, but for some reason the
output is not written out. I have tried with different tracelistners, with
no success.

Has anyone succeeded with this ?

Best of regards...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top