Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Does anyone have ELMAH working with SharePoint 2010? I have the assembly in the bin folder and have what I believe to be the correct entries in the web.config file. I can run the test at http://localhost/elmah.axd/test and generate the test error and can display the error reporting page at http://localhost/elmah.axd but it does not show any errors. I have ELMAH currently configured to retain errors in memory. There was mention in an article about the order of elements in httpModules which I have verified. The site is running on Windows Server 2008 R2 SP1 with SharePoint 2010 Foundation and IIS 7. Below are the entries from my web.config:

   <configSections>
   <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>
   </configSections>
   <Elmah>
    <security allowRemoteAccess="1" />
    <!--<errorlog type="Elmah.XmlFilerErrorLog, Elmah" logPath="~/App_Data" />-->
    <errorLog type="Elmah.MemoryErrorLog, Elmah" size="50" />
   </Elmah>
   <system.web>    
   <httpHandlers>
     <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
   </httpHandlers>    
   <httpModules>
     <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
     <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
     <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
   </httpModules>    
   </system.web>
   <system.webServer>    
   <handlers>     
     <add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" preCondition="integratedMode" type="Elmah.ErrorLogPageFactory, Elmah" />           
   </handlers>
   </system.webServer>
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Since you're using IIS7, you need to put the handlers and modules nodes in the system.webserver node instead of system.web node.

share|improve this answer
    
That was what I needed. It is now working. thanks –  JDM Apr 26 '11 at 17:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.