2011-05-03 65 views
3

我已經將Elmah添加到了我的ASP.NET MVC(1.0)web應用程序中。「無法執行URL」在ASP.NET MVC 1.0中使用Elmah

對/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 

我檢查使用菲爾哈克的RouteDebug.dll路由,有沒有出現任何那裏的問題 - Elmah請求與Global.asax.cs中的routes.IgnoreRoute("{resource}.axd/{*pathInfo}");匹配,因爲它應該是 - 我似乎無法找到有關導致錯誤的更多信息。

我得到同樣的「無法執行URL」從任何以及在ELMAH細節環節 - 如:

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

任何想法?

+0

對此有何進展? – Bob 2011-08-04 16:53:51

回答

1

這爲我工作,即使我在IIS7運行:

添加

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

web.config

得到它從here

希望它可以幫助...
羅布