我看到一些真正奇怪的事情發生在我正在進行的一些項目上。log4net影響其他甚至不使用它的項目
我在一個MVC網站中使用了log4net,這很好。
然後我正在其中使用SharePoint API和只要我包括以下行(其它線不引起問題)
SPLimitedWebPartManager spWebPartManager = web.GetLimitedWebPartManager(」一個完全無關的控制檯應用程序http://blah/blah.aspx?PageView=Shared「,System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
我的控制檯應用程序
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in
the application's .config file. Check your .config file for the <log4net> and <
configSections> elements. The configuration section should look like: <section n
ame="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/
>
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in
the application's .config file. Check your .config file for the <log4net> and <
configSections> elements. The configuration section should look like: <section n
ame="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/
>
我得到這個短暫的延遲後兩次收到以下消息。延遲可能是從頁面獲取Web部件管理器的請求,但我不確定爲什麼此項目中顯示此log4net錯誤。我已經通過代碼和bin文件夾等,並沒有發現任何log4net提及的痕跡。
任何想法,爲什麼會發生這種情況?
要在框架目錄中檢查的文件:csc.rsp,config \ web.config,config \ machine.config – 2010-05-12 12:31:22