Event Log

From: Marathoner (Marathoner_at_discussions.microsoft.com)
Date: 09/15/04

  • Next message: a: "'MachineToApplication' error"
    Date: Wed, 15 Sep 2004 12:01:41 -0700
    
    

    I am tring to write to a custom event log on a Web Server from a Web Service
    on the same machine. Here is my code:

    // Create the source, if it does not already exist.
    if(!EventLog.SourceExists(sAppName))
    {
     EventLog.CreateEventSource(sAppName,
                                sLogName,
                                sMachineName);
    }

    I am currently running on my localhost. I get an error when I check so see
    if the custom event log exists. The error I get is:

    Requested registry access is not allowed.

    Can this be done, and if so, what am I doing wrong?

    Thanks,

    Robert

    -- 
    Robert Hill
    Senior Programmer/Analyst
    Wake Forest Univ Baptist Med Ctr
    

  • Next message: a: "'MachineToApplication' error"