Re: Win XP event log: Access denied

From: Stephane (Stephane_at_discussions.microsoft.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 12:31:03 -0800

I solve my problem using impersonation in web.config like this...

<identity impersonate="true" userName="stephane" password="12345"/>

I guess this is not te best way, but at least it's working on my development
server.

Thanks,

Steph

"richlm" wrote:

> see http://support.microsoft.com/default.aspx?scid=kb;en-us;842795
>
> Yes the default registry permissions on XP/2003 are tighter than on 2000.
>
> The first time your app tries to write to the event log, it checks to see if
> an event source for your application (typically the application name)
> already exists. If not, it tries to create it.
>
> Event log sources are stored in the registry under:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\...
>
> Changing file system permissions will have no effect on the registry. If you
> start regedit.exe and locate the registry key above, right click and select
> 'Permissions' you can see which accounts do have access.
> You could just add the ASPNET account here, but this is a BAD idea because
> it will complicate deployment of your application and weaken security.
>
> The usual solution is to create the event source at installation time using
> EventLog.CreateEventSource (or the EventLogInstaller class). Installation
> will normally be done in the context of an administrator account.
>
> Here's a couple of links to get you started:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingEventLogInstallers.asp
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingyourapplicationassourceofeventlogentries.asp
>
>
>
>



Relevant Pages

  • Re: Windows Service - Event Log
    ... writing to the registry (HKLM). ... that I am too) are talking about creating an Event Log, ... Administrators group on the local machine, or the local System account. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: security exception within Microsoft Application Block ExceptionManager.vb
    ... I am in the registry now. ... > ASPNET account doesn't have permission to create EventLog's, ... > Accessing the Event Log ... > not have sufficient permissions to create new event sources. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Explorer restarts
    ... Event Source: Winlogon ... to log out the first account. ... my registry, to my disdain. ...
    (microsoft.public.windowsxp.help_and_support)
  • Add/Remove Windows Components Setup Error
    ... The program cannot start, probably becasue your user ... account does not have permission to modify the system ... registry via RegEdit, and there is nothing in the ... Application Event Log! ...
    (microsoft.public.win2000.setup)
  • Re: SecurityException trying to create an event source from ASP.NET
    ... The subkey is the name of your application (ie - the Event Source). ... or another privileged account. ... addition to the registry key above so that the event source is created when ... > EventLogEntryType type, Int32 eventID, Int16 category, ByterawData) ...
    (microsoft.public.dotnet.framework.aspnet.security)