Writing to an event log in ASP.NET on Windows Server 2008 IIS7

前端 未结 5 1497
一整个雨季
一整个雨季 2020-12-05 02:55

I\'m trying to use log4net to write to a customer event log under IIS7 on Windows Server 2008 SP1. However, account doesn\'t seem to have access to write to the event log. D

5条回答
  •  猫巷女王i
    2020-12-05 03:26

    I think a more secure option to @Michael Kniskern's good example is:

    regedit...

    HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \Eventlog \your_new_application_log

    Give full control to just the specific application log created for the purposes of your application (in this example right-click your_new_application_log and set permissions there). Once the new log name is created it will appear in the registry nested under eventlog node as above.

提交回复
热议问题