Hello,
I'm getting a generic 500-internal server error, when I'm trying to
access the elmah.axd handler on the websites I have this configured on
(IIS 7.5/.NET 4.0). A good sign is that I am seeing stuff getting
logged to my database (I'm using SQL server). Unfortunately, I'm not
sure how to resolve this, so I would greatly appreciate any
assistance. Below are the configurations I made in the web.config:
At the bottom of the configSections Section:
<sectionGroup name="elmah">
<!-- NOTE! If you are using
ASP.NET 1.x then remove the
requirePermission="false" attribute from the section
elements below as those are only needed for
partially trusted applications in
ASP.NET 2.0 -->
<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" />
<section name="errorTweet" requirePermission="false"
type="Elmah.ErrorTweetSectionHandler, Elmah" />
</sectionGroup>
Directly after the close of the configSections Section:
<elmah>
<security allowRemoteAccess="1" />
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="ErrorDB" />
</elmah>
DB Connection String:
<!-- DB connection for ELMAH -->
<add name="ErrorDB" connectionString="User
ID=elmah;PWD=<PASSWORD>;Data Source=192.168.X.X;Initial
Catalog=elmah;" providerName="System.Data.SqlClient"/>
After the close of the system.web section:
<location path="elmah.axd">
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd"
type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<authorization>
<!--<deny users="*" /> --> <-- Removing this line
does nothing as well
</authorization>
</system.web>
<system.webServer>
<handlers>
<add name="ELMAH" verb="POST,GET,HEAD"
path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"
preCondition="integratedMode" />
</handlers>
</system.webServer>
</location>
In Modules Section of the System.WebServer section:
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"
preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"
preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"
preCondition="managedHandler" />
<add name="ErrorTweet" type="Elmah.ErrorTweetModule, Elmah"
preCondition="managedHandler" />
Thanks in advance,
Sheel Shah