View Single Post
  #5 (permalink)  
Old June 9th, 2003, 07:09 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

In addition to changing the permissions so your code runs fine, you may want to rethink the proposed solution altogether. The biggest problem with creating Event Logs at run time is security. When the possibility was first introduced with early versions of ASP.NET I thought it was quite cool. However, in the mean time Microsoft no longer recommends creating them at run time because of the permissions problems.

If you take a look at the Exception Management Application Block, you can see that the Event Log is now created at install time and then used at run time. This makes it far easier to use......

For more details and hints how to create the event logs, check out:
http://msdn.microsoft.com/library/de...ml/emab-rm.asp

Cheers,

Imar