ELMAH on BlogEngine 2.0, the easy way

16. March 2011 21:24 by rtur.net in BlogEngine  //  Tags: ,   //   Comments (8)

Just got an email asking about how to install ELMAH on BlogEngine.NET 2.0:

I am trying to use Elmah with BE 2.0.0.40
Keep getting web.config errors one after the other.
Are you currently using it? Could you provide me a web.config for BlogEngine

Come on guys! Installing ELMAH by hand? It’s so 2010!

  1. If you don’t have NuGet package manager installed yet, do yourself a favor
  2. Open BlogEngine in Visual Studio, right-click web site in the project explorer and select “Add Library Package Reference..”
  3. Find ELMAH in the NuGet feed and click “Install”. You done.

elmah

elmah2

Comments (8) -

jitendra singh
jitendra singh
3/18/2011 4:08:05 AM #

Its time for Nuget :) Seems it is covered in your previous post.

Brian Davis
Brian Davis
3/18/2011 5:35:32 PM #

Getting 403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.


http://www.kbdavis07.bloggersonline.com/admin/elmah.axd

rtur.net
rtur.net
3/18/2011 7:42:51 PM #

I'm a little confused... why are you trying to access elmah.axd under admin? It lives under site's root just as on the picture above.

Brian Davis
Brian Davis
3/18/2011 10:55:42 PM #

getting error at root level too.

rtur.net
rtur.net
3/19/2011 11:04:47 AM #

This is an error that users who not logged in as admin supposed to see. So you can go to admin panel and edit settings etc. but when you try request elmah.axd it gives you "forbidden"? That is very strange. Did you try it locally, just to make sure it is related to your hosting environment? Sometimes host can block specific type of requests or has modules/handlers that mess up intercepting request before it gets to right handler, I've just ran into similar with WCF services wrongly handled by WebDev module.

Brian Davis
Brian Davis
3/19/2011 3:38:55 PM #

Locally it works fine.  Just when its on a live server is where it have problems.

I access elmah through the admin panel and I can access everything but elmah and admin folders.

What settings on server should I change?

http://www.kbdavis07.bloggersonline.com/admin/
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.

which suppose to happen even when login right?

Can access everything inside of the admin folder but elmah

Brian Davis
Brian Davis
3/19/2011 5:47:10 PM #

Needed:

<elmah>  

        <security allowRemoteAccess="1" />

        <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/app_data/elmah" />

    </elmah>

Ben figure it out:

http://blogengine.codeplex.com/discussions/250335

Its not in the NuGet web.config file.

rtur.net
rtur.net
3/19/2011 6:09:47 PM #

Funny, I was just looking at this page: http://code.google.com/p/elmah/wiki/SecuringErrorLogPages
Glad it worked out for you after all.

Pingbacks and trackbacks (1)+

Comments are closed