Error Creating Event Source

K

Karthik Srinivasan

Hi,

My web application which runs on Windows 2003 server writes to EventLog
during application startup but I get the following exception

Requested registry access is not allowed.

at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName, Boolean useMutex)
at System.Diagnostics.EventLog.WriteEntry(String message,
EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String message,
EventLogEntryType type, Int32 eventID, Int16 category)
at System.Diagnostics.EventLog.WriteEntry(String message,
EventLogEntryType type, Int32 eventID)
at System.Diagnostics.EventLog.WriteEntry(String message,
EventLogEntryType type)
at VZ.DC.ServicesFactories.DCFactory..ctor()



I created the EventLog Source manually as suggested in this article

http://support.microsoft.com/default.aspx?scid=kb;en-us;329291

still no luck.

Any suggestions to resolve this issue?

Thanks In Advance.

Karthik Srinivasan
 
C

CodeMeister

This sounds like a permissions issue with the account your application is
using. You might want to check the registry permission on the new log source
keys and make sure the user/group has read permissions on the keys.

If you are using impersonation on your site, make sure the users also have
access to those keys.

Hope this helps.

Jon
 

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

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top