EventLogging not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PeteZ

    #1

    EventLogging not working

    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.Diagnost ics.EventLog.Wr iteEntry (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


  • Matthew Harper

    #2
    Re: EventLogging not working

    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

    Comment

    Working...