Writing to Event Log from ASP.Net

If you create an Event Log entry from an ASP.Net application using

System.Diagnostics. EventLog.WriteEntry()

with an unregistered value for the Source parameter, you may raise the exception

System.Security. SecurityException: Requested registry access is not allowed.

This can be solved by creating a registry Key with the Source name under


manually or via an installer application, as described in MS KnowledgeBase article 329291. Another possibility is to create a .reg file and import it into the registry.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: