【问题标题】:"Failed to execute URL" using Elmah in ASP.NET MVC 1.0在 ASP.NET MVC 1.0 中使用 Elmah “执行 URL 失败”
【发布时间】:2011-08-17 16:58:06
【问题描述】:

我已将 Elmah 添加到我的 ASP.NET MVC (1.0) Web 应用程序中。

对 /elmah.axd 的请求工作正常,但无法正确呈现。一点挖掘表明,对 /elmah.axd/stylesheet 的请求正在引发 HTTP 500 错误:

Failed to Execute URL.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: Failed to Execute URL.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[HttpException (0x80004005): Failed to Execute URL.]
   System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) +2003857
   System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +393
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +220
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8682818
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

我已经使用 Phil Haack 的 RouteDebug.dll 检查了路由,那里似乎没有任何问题 - Elmah 请求与 Global.asax.cs 中的 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 匹配,因为它应该是 - 我不能似乎找到了有关导致错误的原因的更多信息。

我也从 Elmah 中的任何详细链接中得到相同的“执行 URL 失败” - 例如:

http://mysite/myMvcApp/elmah.axd/detail?id=FDA51223-4486-4759-9075-3C5DAE82094B

有什么想法吗?

【问题讨论】:

    标签: asp.net-mvc iis elmah


    【解决方案1】:

    这对我有用,即使我在 IIS7 上运行:

    添加

    <httpModules>
       ....
       <add name="FixIIS5xWildcardMappingModule" type="Elmah.FixIIS5xWildcardMappingModule, Elmah"/>
    </httpModules>
    

    致您的web.config

    here得到它。

    希望对您有所帮助...

    【讨论】:

      猜你喜欢
      • 2010-10-19
      • 1970-01-01
      • 2011-09-23
      • 1970-01-01
      • 2011-01-08
      • 1970-01-01
      • 2015-06-19
      • 2020-07-09
      • 1970-01-01
      相关资源
      最近更新 更多