how to save trace output into text file

I

IK

Hi all,

How can I save trace output to the text file in app's dir. In addition, I
need to save debug info from Session_End event in global.asax.
The code below saves file only in Windows\System32 dir.
TextWriterTraceListener tracer = new
TextWriterTraceListener("traceout.txt");
Trace.Listeners.Add(tracer);
Trace.WriteLine("Exception"+ex.Message);
tracer.Dispose();

When I try to open file in apps folder I get error message "access denied to
the file ..."

Thanks a lot,
IK
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top