0

I've setup ELMAH on a asp.net mvc 3 site with the correct configuration detailed on another SO question here. Everything works great on my local virtual dev IIS server but when I deploy to an IIS server when I try to go to /Admin/Elmah.axd I get the standard IIS "404 - File or directory not found.". Is there an IIS setting I'm missing?

  <location path="admin">
<system.web>
  <httpHandlers>
    <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
  </httpHandlers>
  <authorization>
    <deny users="?"/>
  </authorization>
</system.web>

Community
  • 1
  • 1
NullReference
  • 4,404
  • 12
  • 53
  • 90

2 Answers2

1

You have got to add the httphandler to the System.Webserver part of the web.config so that IIS routes it:

<system.webServer>   
  <handlers>
    <add verb="POST,GET,HEAD" path="admin/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" name="Elmah"/>
  </handlers> 
</system.webServer>
nickb
  • 59,313
  • 13
  • 108
  • 143
0

I fixed the problem by installing the asp.net mvc elmah controller. You can find it here.

NullReference
  • 4,404
  • 12
  • 53
  • 90