我有一个面向外部(互联网)的 SQL Server 2005 Reporting Services 实例。我想使用 ASP.NET 2.0 启用表单身份验证。一些网站讨论了如何配置它以使其工作,但没有任何说明导致完整的解决方案。有人有简单易懂且行之有效的指示吗?
我正在使用 Windows Server 2003
我有一个面向外部(互联网)的 SQL Server 2005 Reporting Services 实例。我想使用 ASP.NET 2.0 启用表单身份验证。一些网站讨论了如何配置它以使其工作,但没有任何说明导致完整的解决方案。有人有简单易懂且行之有效的指示吗?
我正在使用 Windows Server 2003
阅读MSDN - 在 Reporting Services 2005 中配置表单身份验证的最佳实践中的“将 Reporting Services 集成到 ASP.NET 应用程序”部分。
您需要在 SSRS 和 ASP.NET 应用程序中更改 Web.config:“...将 Web.config 文件的表单和 machineKey 部分的属性设置为参与共享表单身份验证的所有应用程序的相同值。. 。”
<configuration>
<system.web>
<authentication mode="Forms" >
<!-- The name, protection, and path attributes must match
exactly in each Web.config file. -->
<forms loginUrl="login.aspx"
name=".ASPXFORMSAUTH"
protection="All"
path="/"
timeout="30" />
</authentication>
<!-- Validation and decryption keys must exactly match and cannot
be set to "AutoGenerate". The validation and decryption
algorithms must also be the same. -->
<machineKey
validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE"
decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F"
validation="SHA1" />
</system.web>
</configuration>
有关详细信息,请参阅MSDN - 跨应用程序的表单身份验证。
此外,为 Microsoft SQL Server 2005 SP2 安装 Reporting Services 示例并查看“FormsAuthentication Sample”