log4Net EventlogAppender does not work for Asp.Net 2.0 WebSite?

前端 未结 3 1138
情歌与酒
情歌与酒 2020-12-19 02:47

I have configured log4Net EventLogAppender for Asp.Net 2.0. However it does not log anything. I have following in my Web.Config.


    

        
3条回答
  •  既然无缘
    2020-12-19 03:42

    I would suspect code access security is preventing you from accessing the event log. This article have information on the topic. Basically, if your ASP.Net application is running under medium trust the app will not have access to event logs.

    Note: this is not a restriction built into log4net per se, it is a "feature" of the .Net Framework and ASP.Net.

提交回复
热议问题