EventLogging not working

  • Thread starter Thread starter PeteZ
  • Start date Start date
P

PeteZ

Hi,

When I run a class (that logs events to the event log) on my local machine
it works fine, yet when I run it on a development web server nothing happens
(no events get logged in Event Log).

eg: System.Diagnostics.EventLog.WriteEntry (sSource, sMessage, iLevel);

I have the feeling that it may be a permissioning issue - what do I have to
do to allow this Event logging to work on the web server ?

The Web Server (on Win 2003) runs under the default IIS IUSR_[servername]
account

-peteZ
 
You are correct it is a permissions issue. From the asp.net user
account you can write to an existing log however (application for
instance... or you can create your own custom log).

The particular issue is that the asp.net account does not have enough
permissions to create an event source (requiring registry access).
Create your custom log and source first, then you can write to it from
asp.net

--mh
 
Back
Top