I’ve just pushed new Elmah.MVC package. It contains several changes that I described on my previous post. Current version is v.2.0.0-rc, release candidate that I’m about to spent sometime with testing and collecting feedback before it’s availability.
I think ELMAH.MVC is getting it’s shape. Hopefully it will be as easy to use as indented.
Quickly recap the major and breaking changes of ELMAH.MVC 2.0.
First noticeable change is that ELMAH.MVC is no longer deployed as several source files, having new Area and Elmah controller inside. The the sake of compatibility and reach functionality it is now deployed as
Elmah.Mvc.dll. It’s using David’s Ebbo WebActivator project to bootstrap itself, registering routes and global filters.
In 2.0 ELMAH is accessed by
/elmah route (not
/admin/elmah as it was in previous versions). There are several reasons for that. First one is because of new ‘Admin’ area is not created anymore, second is the really strange behavior is ASP.NET MVC default routing rules.
If you tried to use ELMAH in ASP.NET MVC, you are probably implemented your own HandleErrorAttribute, as it’s shown in this example. You no longer need to apply this custom code with Elmah.MVC. As soon you installed package, so can safely remove your HandleError attribute, since it’s already included into package.
In previous Elmah.MVC version, you have to go to
web.config file and remove all handlers manually. Elmah.MVC 2.0 is now having
elmah.corelibrary as dependency and provides it’s own web.config.transform that excludes all legacy stuff. In short, no more
/elmah.axd to remove.
Now, you are very flexible with authorization rules of
ElmahController. web.config contains several
elmah.mvc.* app keys you can tweak it. Disable or apply authentication based on roles, no problem.
I would be really happy if you help me to test it. You are welcome to try it out. Please install new package and let me know your opinion or bugs you might find. To install preliminary version, just do.
PM> Install-Package Elmah.MVC -Pre