Win XP event log: Access denied

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Win XP event log: Access denied

    Hi,

    I have an ASP.NET web site using event log to log errors. My home server
    used to be Win 2000 and it has always worked fine. Few days ago, I installed
    Win XP and since then, I have security problems... Here's the error I get:

    System.Web.Services.Protocols.SoapException: Server was unable to process
    request. --> Cannot open log for source {0}. You may not have write access.
    --> Access is denied

    I don't know how to set permissions in Win XP to let ASPNET user write in
    event log.

    Any idea??

    Thanks,

    Stephane
    Stephane Guest

  2. Similar Questions and Discussions

    1. Web Service + Anon Access, but getting 401 Access Denied Error
      I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    2. ItemDataBound Event - How to access the previous record when this event is raised in DataGrid?
      ItemDataBound Event - How to access the previous record when this event is raised in DataGrid? During "ItemDataBound Event", I would like...
    3. EMAB, Impersonation, & Access Denied to Event Log in ASP.NET
      Hi, I am working on an ASP.NET project and wanted to use the Exception Management Application Block to do my error logging. With the ASP.NET...
    4. Access is denied on DC System Event log
      When I am running computer management of any of our Windosw Server 2003 Domain controllers & I attempt to view the System Event Log, I recieve this...
    5. Access denied when creating Access application object
      In an ASP file I am running the following in VBScript in order to extract data from an Access 2002 MDB file which is physically located in the...
  3. #2

    Default RE: Win XP event log: Access denied

    Hi,

    After few other tests, it looks like it's any of my applications which are
    called by ASP.NET that are having trouble with event log. Here's the last
    error:

    System.InvalidOperationException: Cannot open log for source {0}. You may
    not have write access. ---> System.ComponentModel.Win32Exception: Access is
    denied

    I didn't have this problem on windows 2000. But since I'm on Win XP now, I
    have to solve this. I set full control to everyone on every drive of my
    computer and it still not working...

    Any idea of how to set permissions to write in event log in Win Xp?

    Thanks,

    Steph
    Stephane Guest

  4. #3

    Default Re: Win XP event log: Access denied

    see [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;842795[/url]

    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\Servic es\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:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingEventLogInstallers.asp[/url]
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingyourapplicationassourceofeventlogentrie s.asp[/url]



    richlm Guest

  5. #4

    Default Re: Win XP event log: Access denied

    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 [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;842795[/url]
    >
    > 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\Servic es\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:
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingEventLogInstallers.asp[/url]
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingyourapplicationassourceofeventlogentrie s.asp[/url]
    >
    >
    >
    >
    Stephane Guest

  6. #5

    Default Re: Win XP event log: Access denied

    Stephane wrote:
    > Hi,
    > I have an ASP.NET web site using event log to log errors. My home server
    > used to be Win 2000 and it has always worked fine. Few days ago, I installed
    > Win XP and since then, I have security problems... Here's the error I get:
    > System.Web.Services.Protocols.SoapException: Server was unable to process
    > request. --> Cannot open log for source {0}. You may not have write access.
    > --> Access is denied
    > I don't know how to set permissions in Win XP to let ASPNET user write in
    > event log.
    > Any idea??
    > Thanks,
    > Stephane
    Did you ever get a response to this question, Stephanie? I am getting the
    same error and I'm looking for a clue. I have a web service running on my
    server and the client program is showing me this error when it tries to
    execute the web service. If I change the Anonymous Access user that the
    web service runs as to an account with Administrator permissions, it works
    without error, but if I don't, then I get this error every time.

    Ted

    Ted Jung Guest

  7. #6

    Default Re: Win XP event log: Access denied

    You might try enabling some auditing on the server in question in Local
    Security Policy and setting the SACL on the event log files and registry
    keys to see if you can see what access is generating the failure. Auditing
    is really helpful for tracking down security-related failures.

    Joe K.

    "Ted Jung" <tedjung@microsoft.com> wrote in message
    news:f9cecc74b07fc3685cd062c38feaaa3c$1@www.sslgur u.com...
    > Stephane wrote:
    >
    >> Hi,
    >
    >> I have an ASP.NET web site using event log to log errors. My home server
    >> used to be Win 2000 and it has always worked fine. Few days ago, I
    >> installed Win XP and since then, I have security problems... Here's the
    >> error I get:
    >
    >> System.Web.Services.Protocols.SoapException: Server was unable to process
    >> request. --> Cannot open log for source {0}. You may not have write
    >> access. --> Access is denied
    >
    >> I don't know how to set permissions in Win XP to let ASPNET user write in
    >> event log.
    >
    >> Any idea??
    >
    >> Thanks,
    >
    >> Stephane
    >
    > Did you ever get a response to this question, Stephanie? I am getting the
    > same error and I'm looking for a clue. I have a web service running on my
    > server and the client program is showing me this error when it tries to
    > execute the web service. If I change the Anonymous Access user that the
    > web service runs as to an account with Administrator permissions, it works
    > without error, but if I don't, then I get this error every time.
    >
    > Ted
    >

    Joe Kaplan \(MVP - ADSI\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139