我试图将ELMAH集成到webforms应用程序中。由于我不允许更改的原因,整个应用程序只能通过HTTPS访问。通过ASP.NET WebForms中的HTTPS远程访问elmah.axd时出现“Forbidden”错误
该应用程序正在运行,但我们无法远程访问ELMAH的日志文件。我遵循this说明,以便远程访问没有成功。
这是在生产web.config文件目前相关配置:
<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.ErrorLogModule, Elmah"/>
</httpModules>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
还有什么我可以做什么?任何人都知道,通过HTTPS访问ELMAH的日志文件是否有某种限制?
请注意,我们目前正在使用IIS 6.0和.NET Framework 2.0。
您的web.config配置了安全allowRemoteAccess =“yes”,而您链接到的引用文档表明安全allowRemoteAccess =“1” – tawman 2011-01-14 19:43:33
@tawman:从Elmah的文档:要启用远程访问,allowRemoteAccess属性的值可以是1,是,是真的还是在。 – rsenna 2011-01-14 20:01:22