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

时间:2009-03-11 20:57:24

标签: asp.net reporting-services forms-authentication

我有一个面向外部(Internet)的SQL Server 2005 Reporting Services实例。我想使用ASP.NET 2.0启用表单身份验证。有几个网站讨论如何配置它以使其工作,但没有一条指令导致完整的解决方案。是否有人制定了易于遵循并且有效的说明?

我正在使用Windows Server 2003

1 个答案:

答案 0 :(得分:1)

阅读MSDN - Best Practices for Configuring Forms Authentication in 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 - Forms Authentication Across Applications

此外,安装Reporting Services samples for Microsoft SQL Server 2005 SP2并查看“FormsAuthentication Sample”