Can't access /elmah on production server with Elmah MVC?

一个人想着一个人 提交于 2019-11-28 04:49:47

You need to enable Elmah for remote access by adding the following configuration setting to the <elmah> section in your web.config file. The default setting for this value is false, which only allows localhost, hence why it is working on your local machine from within Visual Studio.

   <elmah>
      <security allowRemoteAccess="true"/>
   </elmah>

I always seem to forget this myself and spend a few minutes scratching my head ;)

scottm

Make sure you HttpHandler is defined in the webServer section in your web.config file.

<system.webServer>
  <httpHandlers>
    <add name="elmah" verb="GET" path="elmah.axd"  type="Elmah.ErrorLogPageFactory, Elmah"/>
  </httpHandlers>
</system.webServer>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!