EntLib5: Loggin application block not logging to Event Log (exception: type LogWriter cannot be constructed)- Can anyone help?

梦想的初衷 提交于 2019-12-05 06:42:10

Martin, you've created a file-based configuration source, but you haven't redirected the logging section to it.

Add the following to App.config inside enterpriseLibrary.ConfigurationSource node:

<redirectSections>
      <add sourceName="File-based Configuration Source" name="loggingConfiguration" />
</redirectSections>

In addition, I recommend the Configuration Sources Labs from the Enterprise Library 5.0 Hands-on Labs set. It covers this and more advanced scenarios.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!