ELMAH不工作IIS7服务器上 [英] Elmah not working on IIS7 server

查看:142
本文介绍了ELMAH不工作IIS7服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的MVC 3网站上运行ELMAH,并拥有一切我的本地开发机器上工作。

I have Elmah running on my MVC 3 site, and have everything working on my local development machine.

不过,现在我已经感动我的网站我的生产服务器,ELMAH不工作。我是我活的服务器上使用相同的SQL帐户(和连接字符串),因为我用我的本地机器上。在EF4连接(同ELMAH)的作品就好了。

However, now that I've moved my site to my production server, Elmah is not working. I am using the same SQL account (and connection string) on my live server as I'm using on my local machine. The EF4 connection (same as Elmah) works just fine.

我没有看到,即使日志或SQL事件探查什么。我没有看到任何错误的SQL日志,以

I don't see anything in the Even Logs or in SQL Profiler. I don't see any errors in the SQL logs either.

什么可能会发生的任何想法,或者我怎么能解决此?

Any ideas on what could be happening, or how I could troubleshoot this?

先谢谢了。

推荐答案

ELMAH正在使用的HttpModule记录错误。对于IIS6,是的HttpModules下的System.Web在web.config文件中注册。然而,对于IIS7 +,的HttpModules应在system.webserver命名空间下注册。嵌入式开发Web服务器将使用IIS6配置。

ELMAH is using a HttpModule to log errors. For IIS6, HttpModules are registered under System.Web in the web.config file. However, for IIS7+, HttpModules should be registered under the system.webserver namespace. The embedded development web server will use the IIS6 config.

IIS6:

  <system.web>
    <httpModules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
    </httpModules>
  </system.web>

IIS7:

  <system.webServer>
    <modules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
    </modules>
  </system.webServer>

这篇关于ELMAH不工作IIS7服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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