Writing ASP.NET errors to the NT Applicaion Event Log

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

  1. #1

    Default Writing ASP.NET errors to the NT Applicaion Event Log

    I have some code that presents the user with an error if my web
    application errors. I would like to write the same information to the
    NT Application Event log. The problem is that Windows 2003 Server does
    not allow IIS ASP.NET to write to the event log. What do I need to do
    to allow this?

    TIA

    Graham Harris
    Graham Harris Guest

  2. Similar Questions and Discussions

    1. jrun default event log errors
      Does anyone see any familiar issues by just looking at this default-event.log from the Jrun server? We are running CFMX6.1 updater. Thanks for...
    2. Event Service errors
      My server log and exception log both contain this error string when I restart the service. Unable to initialize Event service:...
    3. DCOM Errors on 2003 Ent, Event ID:10016
      Everyone, Really pulling my hair out on this one and hope somone can help. Built a new 2003 Advanced Server, SP1 and copied our web site...
    4. Event Errors
      We are running windows server 2003 and are getting sevice failed errors on start up directing to look in the event viewer. This is the error:...
    5. Application Event log errors
      I've got XP Pro clients on a W2K domain, the DC running AD, DNS and DHCP. In my XP application event log I get these 2 errors regularly: ...
  3. #2

    Default Re: Writing ASP.NET errors to the NT Applicaion Event Log

    Hello Graham,


    in w2k3 you can set ACLs on Event Logs - this is done by using an SDDL (Security
    Descriptor Description Language).

    The default for the Application Log is

    O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0x f0007;;;SY)(A;;0x7;;;BA)
    (A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)

    (nice, eh?)

    found under : HKEY_LOCAL_MACHINE\System\CurrentControlSet\ Services\Eventlog\Application\CustomSD


    this basically means service accounts/admins have read/write - no one else

    you can find more info on SDDL via
    [url]http://msdn.microsoft.com/library/en-us/security/security/security_descriptor_string_format.asp[/url]

    and more info on how to change that settings:
    [url]http://msdn.microsoft.com/library/en-us/dncode/html/secure06122003.asp[/url]

    ---------------------------------------
    Dominick Baier - DevelopMentor
    [url]http://www.leastprivilege.com[/url]
    > I have some code that presents the user with an error if my web
    > application errors. I would like to write the same information to the
    > NT Application Event log. The problem is that Windows 2003 Server does
    > not allow IIS ASP.NET to write to the event log. What do I need to do
    > to allow this?
    >
    > TIA
    >
    > Graham Harris
    >


    Dominick Baier [DevelopMentor] Guest

  4. #3

    Default Re: Writing ASP.NET errors to the NT Applicaion Event Log

    Our aspx apps write to the Application event log on w2k3 server and we
    didn't have to change anything. Are you by chance trying to specify the
    Source property of the event? If so, you basically want to create the
    Source value as a valid event source in advance. Once you do that it should
    work without any permission changes.

    "Graham Harris" <ng@bmsgharr.globalnet.co.uk> wrote in message
    news:O7fNceVVFHA.4028@TK2MSFTNGP10.phx.gbl...
    >I have some code that presents the user with an error if my web
    > application errors. I would like to write the same information to the
    > NT Application Event log. The problem is that Windows 2003 Server does
    > not allow IIS ASP.NET to write to the event log. What do I need to do
    > to allow this?
    >
    > TIA
    >
    > Graham Harris

    Brad Guest

  5. #4

    Default Re: Writing ASP.NET errors to the NT Applicaion Event Log

    Hello Brad,

    it all depends under which account your app is running - as you can see,
    Service Accounts are allowed to write to the Application Log - but not custom
    accounts, by default.

    But it is true - you cannot create an Event Source as non admin.

    Write a little console app the pre-creates it and run it as admin.

    ---------------------------------------
    Dominick Baier - DevelopMentor
    [url]http://www.leastprivilege.com[/url]
    > Our aspx apps write to the Application event log on w2k3 server and we
    > didn't have to change anything. Are you by chance trying to specify
    > the Source property of the event? If so, you basically want to create
    > the Source value as a valid event source in advance. Once you do that
    > it should work without any permission changes.
    >
    > "Graham Harris" <ng@bmsgharr.globalnet.co.uk> wrote in message
    > news:O7fNceVVFHA.4028@TK2MSFTNGP10.phx.gbl...
    >
    >> I have some code that presents the user with an error if my web
    >> application errors. I would like to write the same information to the
    >> NT Application Event log. The problem is that Windows 2003 Server
    >> does not allow IIS ASP.NET to write to the event log. What do I need
    >> to do to allow this?
    >>
    >> TIA
    >>
    >> Graham Harris
    >>


    Dominick Baier [DevelopMentor] 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