首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法为CustomSecuritySample启用SSRS2016

无法为CustomSecuritySample启用SSRS2016
EN

Stack Overflow用户
提问于 2017-05-04 14:23:18
回答 2查看 521关注 0票数 0

我无法让微软提供的客户安全示例正常工作。我跟踪了CustomerSecuritySample的自述:https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample

预期结果

我预计在重新启动服务之后,应该在浏览器中输入http://computername/Reports时提供登录屏幕。但是,我仍然得到一个Windows身份验证提示符。我认为我错过了指南中的一些最后步骤,这些步骤需要做才能让它发挥作用,但我想不出是什么步骤。

设置

实例名称::SQL2016 URL设置:http://computername/Reports

所采取的配置步骤

在我遵循自述文件的地方做了以下更改:

RSReportServer.config:

将AuthenticationTypes设置为自定义:

代码语言:javascript
运行
复制
<AuthenticationTypes>
  <Custom/>
</AuthenticationTypes>

用新数据替换UI:

代码语言:javascript
运行
复制
<UI>
  <CustomAuthenticationUI>
    <loginUrl>/Pages/UILogon.aspx</loginUrl>
    <UseSSL>False</UseSSL>
    <PassThroughCookies>
      <PassThroughCookie>sqlAuthCookie</PassThroughCookie>
    </PassThroughCookies>
  </CustomAuthenticationUI>
  <ReportServerUrl>http://computername/Reports</ReportServerUrl>
  <PageCountMode>Estimate</PageCountMode>
</UI>

将安全扩展信息替换为:

代码语言:javascript
运行
复制
<Extension Name="Forms" 
  Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization, Microsoft.Samples.ReportingServices.CustomSecurity" >
  <Configuration>
    <AdminConfiguration>
      <UserName>username</UserName>
    </AdminConfiguration>
  </Configuration>
</Extension>

将身份验证扩展部分替换为:

代码语言:javascript
运行
复制
<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension,Microsoft.Samples.ReportingServices.CustomSecurity" />

RSSrvPolicy.config:

添加了一个新的代码组:

代码语言:javascript
运行
复制
<CodeGroup
  class="UnionCodeGroup"
  version="1"
  Name="SecurityExtensionCodeGroup"
  Description="Code group for the sample security extension"
  PermissionSetName="FullTrust">
  <IMembershipCondition
    class="UrlMembershipCondition"
    version="1"
    Url="C:\Program Files\Microsoft SQL Server\MSRS13.SQL2016\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"/>
</CodeGroup>

Web.config:

在system.web下添加:

代码语言:javascript
运行
复制
<machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />

将身份验证模式从Windows更改为窗体,并添加授权和身份模拟:

代码语言:javascript
运行
复制
<authentication mode="Forms">
      <forms loginUrl="logon.aspx" name="sqlAuthCookie" timeout="60" path="/"></forms>
</authentication>
<authorization>
  <deny users="?" />
</authorization>
<identity impersonate="false" />

RSWebApp/Microsoft.ReportingServices.Portal.WebHost.exe.config:

为报告服务添加了与Web.config中相同的验证和解密密钥

代码语言:javascript
运行
复制
<system.web>
  <machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />
</system.web>

将文件复制到正确的位置

C:\Program \Microsoft\MSRS13.SQL2016\Reporting\RSWebApp:

  1. 复制Microsoft.ReportingServices.Portal.WebHost.exe.config

C:\Program \Microsoft\MSRS13.SQL2016\ReportServer\ReportServer: 1.复制上面提到的其他三个配置文件。复制Microsoft.Samples.ReportingServices.CustomSecurity.dll和.cs 3。将.cs复制到/bin中

EN

回答 2

Stack Overflow用户

发布于 2017-05-04 18:47:33

我正在使用Power运行SSRS预览版本,并且预览不支持多个实例。

当我更改C:\Program \\RSServer\ReportServer中的文件,然后重新启动“独立”时,我得到了登录提示

参考资料:https://github.com/Microsoft/Reporting-Services/issues/21

票数 0
EN

Stack Overflow用户

发布于 2020-07-27 15:29:51

我必须将Microsoft.ReportingServices.Portal.WebHost.exe.config文件(RSWebApp目录)中的MachineKey复制到web.config文件(ReportServer目录)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43785565

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档