如何配置 SSRS 2005 以使用 ASP.NET 2.0 表单身份验证?

发布于 2024-07-15 02:25:24 字数 185 浏览 4 评论 0原文

我有一个面向外部(互联网)的 SQL Server 2005 Reporting Services 实例。 我想使用 ASP.NET 2.0 启用表单身份验证。 多个网站讨论了如何配置它以使其工作,但没有任何说明可以提供完整的解决方案。 有人有易于遵循且有效的简洁说明吗?

我使用的是 Windows Server 2003

I have an instance of SQL Server 2005 Reporting Services that is outward (internet) facing. I want to enable Forms Authentication using ASP.NET 2.0. Several web sites discuss how to configure this to work, but none of the instructions lead to a completed solution. Does someone have consise instructions that are easy to follow and will work?

I'm using Windows Server 2003

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅紫色的梦幻 2024-07-22 02:25:24

阅读 MSDN - 在 Reporting Services 2005 中配置表单身份验证的最佳实践
您需要在 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 示例”

Read section "Integrating Reporting Services into an ASP.NET Application" from MSDN - Best Practices for Configuring Forms Authentication in Reporting Services 2005.
You need to change Web.config in both SSRS and ASP.NET application: "...set attributes of the forms and machineKey sections of the Web.config file to the same values for all applications that are participating in shared Forms authentication..."

<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>

See MSDN - Forms Authentication Across Applications for details.

Also, install Reporting Services samples for Microsoft SQL Server 2005 SP2 and look into "FormsAuthentication Sample"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文