views:

44

answers:

2

I used the NuPack tool to add Elmah to a site on my developer machine. This worked like a charm, but when I send a request to the elmah.axd page all I get in return is 500 - Internal server error.

My code setup:
Visual Studio 2010
Site built on top of EPiServer 4.62B
Running on .NET Framework 2 (because of EPiServer)

My IIS setup:
IIS 7.5
Classic .NET AppPool (because of EPiServer)

My computer:
running Windows 7 32bit (because of EPiServer)

ELMAH content in web.config:

<sectionGroup name="elmah">
  <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
  <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
  <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
  <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>

inside configSections.

<elmah>
  <security allowRemoteAccess="yes" />
  <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>

At this stage I don't really need allowRemoteAccess since I am running everyting from my machine, but trying anything at the moment. And I know elmah.dll is running because the log files are beeing created.

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />

inside system.web | httpHandlers.

<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />

inside system.web | httpmodules.

<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />

inside system.webServer | modules

<add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />

inside system.webServer | handlers

I have basically added every suggestion I could find on the net to the web.config, but without it doing any good. Which leads me to believe that something else is wrong, any ideas?

+1  A: 

You dont have a connection string to the Elmah database in there.

Also have you added the Elmah and SqlLite dlls to your bin folder?

I have a minimal setup guide here which might help:
http://www.codeulike.com/2010/05/quick-elmah-setup.html

codeulike
Thanks for the response! At the moment Elmah is set up to use xml files when tracking errors. So, no connection string needed. And Elmah is producing the files, so the elmah.dll is working.
JustAnotherCoder
A: 

Anything useful in you windows logs? Tried attaching visual studio to the server to try and catch the exception that way ?

Fredrik Leijon
I just left it alone for the moment. Will return back to it eventually, but right now I'll let it rest for a while.
JustAnotherCoder