I have a .net 3.5 web site that works fine when I run it in Visual Studio. However when we run it in IIS there are some errors. What I would like to do is add some type of logging to the web.config so it logs what is happening to the website into a file. Any good way of doing this? Thanks
Share
If your code outputs log info using the built-in .NET System.Diagnostics.Trace functions, you can control and configure where those traces go using your web.config file.
In your code, use calls like
In your web.config, set up an event log trace listener like this:
This will route the trace output from your program to the text file TextWriterOutput.log
More info here: http://msdn.microsoft.com/en-us/library/system.diagnostics.tracelistener.aspx