我希望我的应用程序通过 SSL 提供其所有网页,因此我添加了以下行...
<secureWebPages enabled="true">
<directory path="." />
</secureWebPages>
...到我的 Web.config,生成的编译器错误是:
Build (web): Unrecognized configuration section secureWebPages.
我正在运行 Visual Studio 2008
最佳答案
听起来您可能需要添加适当的configSections
...
<configuration>
<configSections>
<!-- modify as you need. -->
<section
name="secureWebPages"
type="Hyper.Web.Security.SecureWebPageSectionHandler,
WebPageSecurity"
allowLocation="false" />
</configSections>
<secureWebPages mode="On" >
<directories>
<add path="/" recurse="True" />
</directories>
</secureWebPages>
关于asp.net - 如何使 ASP.NET 应用程序仅通过 HTTPS 提供页面服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2976550/