0

I have a website which is working fine locally but not on remote server. Its a MVC4 and Elmah is configured for SQL Server.

  1. I can throw a simple error and see it on elmah locally in my iis (same code).

  2. Config are exactly same, SQL Server ... everything.

  3. On remote server when I test the elmah with http://example.com/elmah.axd/test it logs the error correctly.

  4. Any other error in code is not showing up on elmah.

  5. I checked the Application Pool and its integrated.

I appreciate any help or idea.

tereško
  • 58,060
  • 25
  • 98
  • 150
Edik Simonian
  • 23
  • 1
  • 7

1 Answers1

0

You need to enable Elmah for remote access by adding the following configuration setting to the 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>

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=type="Elmah.ErrorLogPageFactory, Elmah"/>
  </httpHandlers>
</system.webServer>
Kurkula
  • 6,386
  • 27
  • 127
  • 202