Managing Diagnostic Listener Files

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Ive created a web app. which has a web.config file that automatically
creates a text listener file for my Application trace. Over time this file
will grow and I want to understand how best to manage it. Ive tried deleting
it but windows complains that it is in use. This is even the case when I
stop IIS. The only way Ive found of deleting the file is by Rebooting the
machine and deleting it before I run my app.

So my question is - what is the best approach for managing these System
Diagnostic listener files?

Thanks
Andrew
 
Put the data in a database and delete the old records on a schedule.

Dale Preston
MCAD, MCSE, MCDBA
 
to delete a file that is in use, you first rename the current file to a temp
name and then delete the current and the renamed file.
 
Andrew said:
Ive created a web app. which has a web.config file that automatically
creates a text listener file for my Application trace. Over time this file
will grow and I want to understand how best to manage it. Ive tried deleting
it but windows complains that it is in use. This is even the case when I
stop IIS. The only way Ive found of deleting the file is by Rebooting the
machine and deleting it before I run my app.

So my question is - what is the best approach for managing these System
Diagnostic listener files?

My practice is to not use them, but instead to use the
EventLogTraceListener.
 
Ive tried renaming the file but I still get the inuse error. Any other
thoughts

Andrew


Alvin Bruney said:
to delete a file that is in use, you first rename the current file to a temp
name and then delete the current and the renamed file.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Dale said:
Put the data in a database and delete the old records on a schedule.

Dale Preston
MCAD, MCSE, MCDBA
 

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

Back
Top