是否有可能配置ELMAH完全在code? [英] Is it possible to configure ELMAH entirely in code?

查看:118
本文介绍了是否有可能配置ELMAH完全在code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想配置为ELMAH完全在code一个ASP.NET MVC的网站。这包括注册模块,设置日志提供商和设置,过滤例外。

I'd like to configure ELMAH for an ASP.NET MVC site entirely in code. This includes registering the module, setting the logging provider and settings, and filtering exceptions.

我已经设法到目前为止做的唯一的部分是过滤例外。有没有其他人想出如何做到这一点?我真的想避免塞满了我的配置文件与永远不会更改设置。

The only part I've managed to do so far is filter exceptions. Has anyone else figured out how to do this? I'd really like to avoid cluttering up my config file with settings that won't ever change.

推荐答案

我觉得你可以做,使用1.2版测试版<一个href=\"http://$c$c.google.com/p/elmah/issues/list?&q=label%3AMilestone-Release1.2+status=Fixed&can=1\" rel=\"nofollow\">http://$c$c.google.com/p/elmah/issues/list?&q=label%3AMilestone-Release1.2+status=Fixed&can=1

I think you can do that using version 1.2 beta http://code.google.com/p/elmah/issues/list?&q=label%3AMilestone-Release1.2+status=Fixed&can=1

这篇关于是否有可能配置ELMAH完全在code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆