Hi,
I have the following listeners in the web.config:
<add name="FileTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="D:\CapriMon\CapriMon.log"/>
<add name="EventLogTraceListener"
type="System.Diagnostics.EventLogTraceListener"
initializeData="CapriMon"/>
In my codebehind, I use Trace.WriteLine(...) whenever I want to log
something.
If I understand well, any output will be written in the listeners
(either a log file, or the EventLogger or one of it).
Could you confirm that it is the 'initializeData="CapriMon"' that sets
the EvenLogger source?
But my real problem is that I have a server where this logging system
works fine, but on another where I have got an exception whenever I
try to write something in the output. I am administrator on the
machine where it works, but I am not on the production machine where
it is not working (this might help?...). I know that asp.net web
applications are launched by the user ASPNET. So I checked the rights
access on the two different machines and it seems to be equal. Now I
had a look at the IIS configuration on the two servers, but I don't
know what to check that would be related to my problem. Does anyone
has a clue? Maybe there is some other users to set with special
privileges/rights or so? Thank you very much for your help, because I
am completely stuck...
JULIEN