Error writing to the Applicaton Log on a Windows 2003 server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6
The error message is "InvalidOperationException: Cannot open log for source {0}."

I have created a Key called "TEST" under the Application in the Registry based on the
microsoft article 329291 and using Solution 1 in that article

In the code I basically do the following

Dim MyLog as new EventLog(
MyLog.Source = "TEST

Then when an error occurs I do thi

MyLog.WriteEntry(MyLog.Source, "ErrorMessage", EventLogEntryType.Error

But I still get the error "InvalidOperationException: Cannot open log for source {0}.
Before I added the Key to the Registry I was getting Registry Access Denied error

Any suggestions????
 
2003 is pretty much locked down by default. This is possibly being caused by
the security policy settings. Can you do the same thing on a W2K server?
 
So it's probably security. You'll need to relax the server's policy to let
you do that.

You'll get a more specific response if you post to one of the Windows
security or admin groups.
 
Back
Top