first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

ASP.NET: Security Issues Surrounding Writing to the Event Log

By default, the ASPNET user does not have permissions to write to default event logs---even the Application log. One way to address this issue is to let your web application impersonate a user with the correct permissions by entering the impersonate element in the system.web element of the Web.config file:

<system.web>
    ...
    <identity impersonate="true" userName="MyUserName" password="MyClearTextPassword" />
    ...
</system.web>

Another way is to use the Security > Permissions... command in regedt32 on this key:

HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\EventLog

Add the ASPNET account and grant Full Control.

mod date: 2003-09-21T22:43:38.000Z