Question

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?

Was it helpful?

Solution

I'm having this problem too. The only thing I've found that works is to switch my application pool to integrated mode. My app hasn't been fully tested against this though, so I haven't change this in production.

OTHER TIPS

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

There is a possibility that the elmah_error DB table needs repair.

It happened in my case a couple of times and by repairing, it was fixed.

I had the exact same problem elmah-> 500 - Internal Server Error.

just run mysql command:

repair table elmah.elmah_error;

and retry to access elmah.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top