"Forbidden" error while remotely accessing elmah.axd through HTTPS in ASP.NET WebForms
I'm trying to integrate ELMAH in a webforms application. For reasons that I am not allowed to change, the whole application must be accessed only through HTTPS.
The application is working, but we cannot access ELMAH's log file remotely. I have followed this instructions in order to allow remote access with no success.
This is the related configuration currently in the production web.config file:
<configuration>
<configSections>
<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" requirePermission="false" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
<system.web>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModu开发者_JS百科le, Elmah"/>
</httpModules>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
Is there anything else I could do? Anyone knows if there is some kind of restriction in accessing ELMAH's log file through HTTPS?
Notice that we are currently using IIS 6.0 and .NET framework 2.0.
Solution: in your config file: Change the 0 to 1
<security allowRemoteAccess="0" />
to
<security allowRemoteAccess="1" />
which works like a charm.
Enjoy!!
- Place a simple html file in the same directory.
- Try to access that file.
If you can't access that file, it's a directory permissions problem. Because there's no physical axd file, there are no permissions for it per se, so I would tend to think directory security.
I don't think this has anything to do with SSL - a 403 means "you're not allowed to access this item"...that shouldn't have anything to do with the transport security. That is, unless it worked fine, until you turned on SSL.
You might also check execute rights on the directory...allow everything (read, write, execute) and see if that makes a difference.
精彩评论