0

我一直在寻找关于 sitecore 是否支持基于策略(如 Entlib)异常处理和日志记录的单篇文章。

有人可以帮助我正确的方向,是否可以使用最新的sitecore?

谢谢

4

1 回答 1

2

Sitecore itself doesn't have a policy based exception handling mechanism in the same sense as Entlib. That said there is nothing stopping you introducing Entlib policy based exception handling into your Sitecore website as it is still just a regular ASP.NET web application. You can make calls to ExceptionPolicy.HandleException where ever you would normally trap and respond to thrown exceptions in your code.

To get started take a look at the John West post Error Management with the Sitecore ASP.NET CMS and also give some consideration to adding an Application level error handler that applies the Entlib policy that you've setup.

于 2013-02-15T21:27:51.757 回答