Can't write to Eventlog with ASP.NET

G

Guest

Hello.

I am using win2k3 server and the
Microsoft.ApplicationBlocks.ExceptionManagement. I am trying to write an
exception to the eventlog. I have given permissions to the registry that are
required (eg. Network service, AspNet, iusr etc) all have full permission to
the eventlog key in the registry. I have proved that the application is able
to CreateEventSource with no problems, but as soon as it tries to writeEntry
i get an exception as follows:
InvalidOperationException: Cannot open log for source {0}. You may not have
write access....

I have also given everyone full control at c:\Windows\System32\Config\...
Nothing helps. Why!!!!!!

I have read and found solutions within this group but none of the solutions
have helped. Please does someone else have a fresh approach to resloving this
problem.
Thanks in Advance.
 
H

Hans Kesting

pthawkes said:
Hello.

I am using win2k3 server and the
Microsoft.ApplicationBlocks.ExceptionManagement. I am trying to write an
exception to the eventlog. I have given permissions to the registry that are
required (eg. Network service, AspNet, iusr etc) all have full permission to
the eventlog key in the registry. I have proved that the application is able
to CreateEventSource with no problems, but as soon as it tries to writeEntry
i get an exception as follows:
InvalidOperationException: Cannot open log for source {0}. You may not have
write access....

I have also given everyone full control at c:\Windows\System32\Config\...
Nothing helps. Why!!!!!!

I have read and found solutions within this group but none of the solutions
have helped. Please does someone else have a fresh approach to resloving this
problem.
Thanks in Advance.

You need to use InstallUtil on the dll - it contains an installer
that gives the "asp.net user" rights to wtite to the eventlog.

For "InstallUtil" you should open a "visual studio command prompt".
 
G

Guest

Hans.
Thanks for replying, but I'm not trying to use or install a ddl. I am using
the application block(writing to the eventlog) stuff from a Web Application.
 

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,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top