MVC 网站上的 Elmah,带有 WordPress/php 子目录
我使用 ASP.NET MVC 创建了一个网站,并使用 ELMAH 进行错误处理,效果非常好。在我的网站上 /blog 下设置虚拟目录并添加必要的 WordPress php 文件和 mysql db 后,出现以下错误。
Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified.
我认为这与 ELMAH 将自身应用于所有子目录有关。
有没有办法让 ELMAH 忽略 /blog 下的所有内容?或者有办法解决这个问题吗?
提前致谢。
I have created a website using ASP.NET MVC and use ELMAH for error handling, this works perfectly. After setting up a virtual directory on my website under /blog and adding the necessary WordPress php files and mysql db, I get the below error come up.
Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified.
I think this has something to do with the fact that ELMAH is applying itself to all sub-directories.
Is there a way that I can tell ELMAH to ignore everything under /blog? Or is there a way to get around this?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 MVC 项目的 Web.config 复制到 /blog 子目录中,并在其中将所有与 Elmah 相关的处理程序
更改为
- 应该对其进行排序。Copy the MVC project's Web.config into the /blog subdirectory, and inside it, change all of the Elmah-related handlers
<add name="Elmah" etc. etc. />
to<remove name="Elmah" />
- that should sort it.