"未找到资源"而在ASP.NET MVC项目访问elmah.axd错误 [英] "Resource not found" error while accessing elmah.axd in ASP.NET MVC project

查看:120
本文介绍了"未找到资源"而在ASP.NET MVC项目访问elmah.axd错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的ASP.NET MVC应用程序是一个IIS 6.0 Web根目录文件夹中的所谓的东西文件夹中。所以,我访问我的页面作为的http://本地主机/东西/帖子。我有EMLAH,而我使用Visual Studio的内置Web服务器的工作。现在,当我访问 HTTP://localhost/Stuff/elmah.axd ,我得到的资源找不到错误。任何人都能指出我的错误在这里!下面是配置文件条目,

 <添加动词=POST,GET,HEAD路径=elmah.axdTYPE =Elmah.ErrorLogPageFactory,ELMAH/> //处理程序
  <添加名称=ErrorMailTYPE =Elmah.ErrorMailModule,ELMAH/>
  <添加名称=错误日志TYPE =Elmah.ErrorLogModule,ELMAH/>
  <添加名称=ErrorFilterTYPE =Elmah.ErrorFilterModule,ELMAH/> //模块


解决方案

用IIS7的工作,我发现我所需要的的web.config 填充的两个部分(的System.Web system.webServer ) - 见<一href=\"http://stackoverflow.com/questions/933554/elmah-not-working-with-asp-net-site/1175023#1175023\">http://stackoverflow.com/questions/933554/elmah-not-working-with-asp-net-site/1175023#1175023.

这也许是相关的。

My ASP.NET MVC application is within a folder called Stuff within IIS 6.0 webroot folder. So I access my pages as http://localhost/Stuff/Posts. I had EMLAH working while I was using the in-built webserver of Visual Studio. Now when I access http://localhost/Stuff/elmah.axd, I get resource not found error. Can anyone point my mistake here! Here is config file entry,

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/> //Handler
  <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
  <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
  <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/> //Module

解决方案

Working with IIS7 I found I needed both sections of the web.config populated (system.web AND system.webServer) - see http://stackoverflow.com/questions/933554/elmah-not-working-with-asp-net-site/1175023#1175023.

Perhaps this is related.

这篇关于&QUOT;未找到资源&QUOT;而在ASP.NET MVC项目访问elmah.axd错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆