Can't write to Eventlog with ASP.NET

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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".
 
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.
 
Back
Top