ELMAH - MVC 3 - 403 - Forbidden: Access is denied

Just in case anyone comes across the same issue I had.

This was my code, which is wrong:

<elmah>
    <security allowremoteAccess="true" />
</elmah>

The issue was the r in allowremoteAccess, it was in lower case, when it should have been upper-case!

Correct code:

<elmah>
    <security allowRemoteAccess="true" />
</elmah>

Even though I had added the remote access to my web.config:

<add key="elmah.mvc.allowedRoles" value="adminrole" />  

<elmah>
      <security allowRemoteAccess="true" />
      <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="DefaultConnection" />
      </elmah>

I had to edit Elmah.Athz.config on the server and add the role I wanted to give access to elmah. I had to add ^adminrole


(This is all from the documentation/getting started)

You don't need the following line:

routes.IgnoreRoute("elmah.axd");

The next line takes care of it.

Everything you need to configure is in your web.config file. Something like:

<elmah>
  <security allowRemoteAccess="yes" />
  <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="mySqlConnString" />
</elmah>
<location path="elmah.axd">
  <system.web>
    <authorization>
      <allow roles="Administrator" />
      <deny users="*" />
    </authorization>
  </system.web>
</location>

Should get you going.