我无法让微软提供的客户安全示例正常工作。我跟踪了CustomerSecuritySample的自述:https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample
预期结果
我预计在重新启动服务之后,应该在浏览器中输入http://computername/Reports时提供登录屏幕。但是,我仍然得到一个Windows身份验证提示符。我认为我错过了指南中的一些最后步骤,这些步骤需要做才能让它发挥作用,但我想不出是什么步骤。
设置
实例名称::SQL2016 URL设置:http://computername/Reports
所采取的配置步骤
在我遵循自述文件的地方做了以下更改:
RSReportServer.config:
将AuthenticationTypes设置为自定义:
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
用新数据替换UI:
<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>
将安全扩展信息替换为:
<Extension Name="Forms"
Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization, Microsoft.Samples.ReportingServices.CustomSecurity" >
<Configuration>
<AdminConfiguration>
<UserName>username</UserName>
</AdminConfiguration>
</Configuration>
</Extension>
将身份验证扩展部分替换为:
<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension,Microsoft.Samples.ReportingServices.CustomSecurity" />
RSSrvPolicy.config:
添加了一个新的代码组:
<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下添加:
<machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />
将身份验证模式从Windows更改为窗体,并添加授权和身份模拟:
<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中相同的验证和解密密钥
<system.web>
<machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />
</system.web>
将文件复制到正确的位置
C:\Program \Microsoft\MSRS13.SQL2016\Reporting\RSWebApp:
C:\Program \Microsoft\MSRS13.SQL2016\ReportServer\ReportServer: 1.复制上面提到的其他三个配置文件。复制Microsoft.Samples.ReportingServices.CustomSecurity.dll和.cs 3。将.cs复制到/bin中
发布于 2017-05-04 18:47:33
我正在使用Power运行SSRS预览版本,并且预览不支持多个实例。
当我更改C:\Program \\RSServer\ReportServer中的文件,然后重新启动“独立”时,我得到了登录提示
参考资料:https://github.com/Microsoft/Reporting-Services/issues/21
发布于 2020-07-27 15:29:51
我必须将Microsoft.ReportingServices.Portal.WebHost.exe.config文件(RSWebApp目录)中的MachineKey复制到web.config文件(ReportServer目录)。
https://stackoverflow.com/questions/43785565
复制相似问题