JP Hellemons Building E-commerce web applications

Add Elmah to BlogEngine.net

17. August 2012 18:08by jphellemons in BlogEngine.NET, Blog

My blog was offline a few days ago. The IIS application pool stopped. To investigate if it had something to do with my BlogEngine installation, I wanted to install Elmah. That was an easy one. Here is how I did it in just a few steps:

- download your current BlogEngine installation from the remote webserver

- Open it with Visual Studio (open website)

- Run it with Visual Studio to make sure that there are no build errors

- Right click on the solution:

image

- Select manage NuGet Packages

- Search for Elmah

- Hit install

- Edit the web.config, add

<authorization>
<allow roles="Administrators"/>
<deny users="*"/>
</authorization>
Just below
<location path="elmah.axd" inheritInChildApplications="false">
<system.web>

And change

<elmah>
<security allowRemoteAccess="false"/>
</elmah>

the allow remote access to true.

- Save and upload the new web.config, and upload and overwrite the files from the bin folder.

Only logged in administrators now have access to yourdomain.com/elmah.axd

Good luck!

kick it on DotNetKicks.com Shout it

Share or Bookmark this post…
  • del.icio.us
  • Digg
  • DotNetKicks
  • eKudos
  • E-Mail
  • Facebook
  • Google
  • LinkedIn
  • msdn Social
  • Reddit
  • NuJIJ
  • Slashdot
  • TwitThis
  • StumbleUpon

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading