Hi everyone, I know that this has been published as the previous question several times, but I reviewed each question and their proposed solutions, and I still can not overcome my 404 problem. I am running Elmah 1.1 32-bit. I referred to ASP.NET MVC - Elmah did not work and returned a 404 page for elmah.axd , but I was out of luck after applying the suggestions.
I am running ASP.NET MVC 3. Here is my web.config:
...
<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>
...
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="dbconn" /> <errorFilter> <test> <jscript> <expression> <![CDATA[ // @assembly mscorlib // @assembly System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // @import System.IO // @import System.Web HttpStatusCode == 404 || BaseException instanceof FileNotFoundException || BaseException instanceof HttpRequestValidationException /* Using RegExp below (see http://msdn.microsoft.com/en-us/library/h6e2eb7w.aspx) */ || Context.Request.UserAgent.match(/crawler/i) || Context.Request.ServerVariables['REMOTE_ADDR'] == '127.0.0.1' // IPv4 only ]]> </expression> </jscript> </test> </errorFilter>
I ignored my .axd routes using: routes.IgnoreRoute ("{resource} .axd / {* PathInfo}");
I run the site in IIS7, 32-bit mode is enabled. I tried many different configuration options, but all of this did not help. Any ideas?
Thanks Shan
source share