Error writing to the Applicaton Log on a Windows 2003 server

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????
 
K

Klaus H. Probst

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?
 
K

Klaus H. Probst

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top