views:

538

answers:

2

I'm trying to deploy elmah. For inexplicable reasons, I'm getting an error: .axd files are explicitly forbidden. I've already fixed what I can control (my web.config) and solutions requiring collaboration from the system admin are not available (such as editing machine web.config or updating IIS mappings). I also verified that it works fine on several other machines with ordinary configurations.

Ashx is supposed to be like axd, so are there any differences between axd and ashx I should take into consideration when converting from one to the other?

UPDATE: I think I answered my own question. I change the web.config to read

 <add verb="POST,GET,HEAD" path="elmah.ashx" type="Elmah.ErrorLogPageFactory, Elmah" />

It seems to work. The source code for elmah doesn't even have the string axd in it.

+1  A: 

Good to see you got the answer :)

The axd extension is normally used in the cases where only .NET 1.1 or earlier is being used. And the developer does not have access to modify the extensions allowed in IIS 6 or earlier.

In your case, it seems all tracing has been disabled on the server from a higher config level.

Your answer that you find, should work correctly without issues.

leppie
+3  A: 

The answer is to change the web.config to look like this:

<add verb="POST,GET,HEAD" path="elmah.ashx" type="Elmah.ErrorLogPageFactory, Elmah" />

In fact, some source on the web say, unless you are microsoft you shouldn't name any handlers axd lest you have a name conflict with a future version of ASP.NET.

MatthewMartin