针对 elmah.axd 的请求始终失败,并出现 500 - 内部服务器错误。为什么? :-(
我使用 NuPack 工具将 Elmah 添加到我的开发人员计算机上的站点。这就像一个魅力,但当我向 elmah.axd 页面发送请求时,我得到的回报是 500 - 内部服务器错误。
我的代码设置:
Visual Studio 2010
站点构建在 EPiServer 4.62B 之上
在 .NET Framework 2 上运行(由于 EPiServer)
我的 IIS 设置:
IIS 7.5
经典 .NET AppPool(因为 EPiServer)
我的计算机:
运行 Windows 7 32 位(因为 EPiServer)
ELMAH 内容位于 web.config:
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
configSections 内。
<elmah>
<security allowRemoteAccess="yes" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
在这个阶段,我实际上并不需要allowRemoteAccess,因为我正在从我的机器上运行所有内容,但目前正在尝试任何内容。我知道 elmah.dll 正在运行,因为正在创建日志文件。
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
内部 system.web | httpHandlers。
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
内部 system.web | http模块。
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
内部 system.webServer | 模块
<add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
system.webServer 内的 |我
基本上已将在网上找到的所有建议添加到 web.config 中,但没有任何好处。这让我相信还有其他问题,有什么想法吗?
I used the NuPack tool to add Elmah to a site on my developer machine. This worked like a charm, but when I send a request to the elmah.axd page all I get in return is 500 - Internal server error.
My code setup:
Visual Studio 2010
Site built on top of EPiServer 4.62B
Running on .NET Framework 2 (because of EPiServer)
My IIS setup:
IIS 7.5
Classic .NET AppPool (because of EPiServer)
My computer:
running Windows 7 32bit (because of EPiServer)
ELMAH content in web.config:
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
inside configSections.
<elmah>
<security allowRemoteAccess="yes" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
At this stage I don't really need allowRemoteAccess since I am running everyting from my machine, but trying anything at the moment. And I know elmah.dll is running because the log files are beeing created.
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
inside system.web | httpHandlers.
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
inside system.web | httpmodules.
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
inside system.webServer | modules
<add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
inside system.webServer | handlers
I have basically added every suggestion I could find on the net to the web.config, but without it doing any good. Which leads me to believe that something else is wrong, any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那里没有 Elmah 数据库的连接字符串。
另外,您是否已将 Elmah 和 SqlLite dll 添加到 bin 文件夹中?
我这里有一个最小的设置指南,可能会有所帮助:
http://www.codeulike.com/2010/05/quick-elmah -setup.html
You dont have a connection string to the Elmah database in there.
Also have you added the Elmah and SqlLite dlls to your bin folder?
I have a minimal setup guide here which might help:
http://www.codeulike.com/2010/05/quick-elmah-setup.html
我发现唯一有效的方法是将我的应用程序池切换到集成模式。不过,我的应用程序尚未对此进行全面测试,因此我没有在生产中对此进行更改。
The only thing I've found that works is to switch my application pool to integrated mode. My app hasn't been fully tested against this though, so I haven't change this in production.
elmah_error DB 表可能需要修复。
我的情况发生过几次,通过修复,问题就解决了。
我遇到了完全相同的问题 elmah-> 500 - 内部服务器错误。
只需运行 mysql 命令:
repair table elmah.elmah_error;
并重试访问 elmah。
There is a possibility that the elmah_error DB table needs repair.
It happened in my case a couple of times and by repairing, it was fixed.
I had the exact same problem elmah-> 500 - Internal Server Error.
just run mysql command:
repair table elmah.elmah_error;
and retry to access elmah.