Elmah not working on IIS7 server(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 在 web.config 文件中的 System.Web 下注册.但是,对于 IIS7+,应该在 system.webserver 命名空间下注册 HttpModules.嵌入式开发 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 服务器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Elmah 无法在 IIS7 服务器上运行
基础教程推荐
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
