Q : Error While Writing to CUSTOM EventLog

M

Marauderz

OK this just seems to be a common question being asked around here, I've
tried Google Grouping the question but I still haven't came up with a
solution yet. So here goes...

I'm getting the Security Exception about being Unable to Access a Registry
Key when trying to write to my custom event log.

the Eventlog I'm trying to write to, has already been created via an
Installer class

I've already given the ASPNET user fullaccess to both the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyEventLog
keys

and I STILL can't write to the log... reading seems to be fine though.

So... any ideas guys?

Thanks.
 
G

Gai

The problem is on the first time the application writes to the EventLog with
the new "MyEventLog" string (Adding the new entry).

The easiest way is to manually add an entry to your registry at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\My
EventLog

Just copy on of the existing entries for the inner values.

Hope it helps.
 
M

Marauderz

Nope, there are already entries in the event log written by another program.
So the log is not empty.
Thanks.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,834
Latest member
BuyCannaLabsCBD

Latest Threads

Top