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

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application

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.

About these ads

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 )

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: