Elmah 不记录任何错误消息
好吧,我不知道为什么 Elmah 在 Windows Azure 上部署时没有记录任何错误。另一件事是它以前曾经有效过。环境是一样的。
- 在 Sql Azure 上使用 SqlErrorLog
- Sql Azure 与主站点共享相同的数据库。我没有使用单独的数据库,因此我可以使用相同的连接字符串。
- 构建源代码,我排除了 VistaDB 和 SQLite dll。
我检查了 web.config 设置,并在 system.webServer 下定义了处理程序和模块。它似乎可以在本地开发(webdev.exe)下记录消息,并且本地 sql express 架构已导出到 sql azure 架构(包括存储过程)。
唯一的区别是,在主站点上,应用程序在具有多个子域的主域下运行。在本地,这是通过修改主机文件来模拟的。本地日志正常,但部署时日志不行。
关于我应该做什么来找出问题所在的任何想法?最后一个选择是使用诊断来跟踪/找出部署时出现的问题,但这是一个皮塔饼。
Ok, I do not know why Elmah is not logging any errors while deployed on Windows Azure. Another thing is that it used to work before. The environment is the same.
- using SqlErrorLog on Sql Azure
- Sql Azure sharing the same database as the main site. I did not use a separate database so I can use the same connection string.
- building off the source and I've excluded the VistaDB and SQLite dlls.
I've checked my web.config settings and have the handler and module defined under system.webServer. It seems to log messages alright under local development (webdev.exe) and the local sql express schema was exported to an sql azure schema (including the stored procs).
The only difference is that on the main site, the app is running under a main domain with multiple subdomains. Locally this is simulated by modifying the host file. Logs ok locally but not when deployed.
Any ideas on what I should do to find out what's wrong? Last option is using diagnostics to trace/find out what's wrong while it's deployed but that's a pita.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,表 Elmah_Error 是使用 Sql Azure 不支持的非聚集主键创建的。
即使您将目标指定为 SQL Azure,SSMS 2008 R2 Nov CTP 似乎仍将非集群 PK 导出为非集群 PK。 :(
It turns out that the table Elmah_Error was created with a non-clustered primary key which is not supported by Sql Azure.
It seems that the SSMS 2008 R2 Nov CTP still exports nonclustered PK as nonclustered PKs even when you specify the target as SQL Azure. :(