locked
Cannot get Elmah to work when I deploy my application RRS feed

  • Question

  • User-788299254 posted

    I am using MVC 2 for my application that uses Elmah which I am deploying to a build server.

    The build server uses IIS 7.5.

    I run a script to create the database tables on SQL Server 2008. I use the aspnetdb database which I also use for Forms Authentication as supplied by Microsoft.

    This works fine on my Dev server.

    In my web.config file I have Elmah set up as follows;

          <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.SqlErrorLog, Elmah" connectionStringName="ApplicationServices" applicationName="SHP" />
            <errorMail from="noreply@xxxxx.co.uk" to="slartibartfast@xxxxx.co.uk" subject="SHP Error" async="true " smtpPort="25" smtpServer="xxxxx.com" />
          </elmah>
    ...
      <system.web>
        <httpRuntime encoderType="SHP.Models.AntiXssEncoder, SHP" />
        <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" />
        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
          <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
        </modules>
        <handlers>
          <add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
        </handlers>
      </system.webServer>

    Friday, March 25, 2011 4:44 AM

All replies

  • User-1028151323 posted

    Are you deploying to a shared server? Elmah needs full trust.

    Friday, March 25, 2011 9:48 AM