我試圖將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