C# 无法为SSRS2016启用CustomSecuritySample
我无法使Microsoft提供的客户安全示例正常工作。我遵循了客户安全自述文件示例: 预期结果 我希望在重新启动服务后,在进入浏览器时应提供登录屏幕。但是,我仍然得到一个Windows身份验证提示。我想我错过了指南中的一些最后步骤,这些步骤需要完成才能使其发挥作用,但我无法弄清楚是什么 安装程序 实例名称:SQL2016 Reporting Services配置管理器中设置的URL: 采取的配置步骤 在我遵循自述的地方做了以下更改: RSReportServer.config: 将AuthenticationTypes设置为自定义:C# 无法为SSRS2016启用CustomSecuritySample,c#,windows,reporting-services,ssrs-2016,C#,Windows,Reporting Services,Ssrs 2016,我无法使Microsoft提供的客户安全示例正常工作。我遵循了客户安全自述文件示例: 预期结果 我希望在重新启动服务后,在进入浏览器时应提供登录屏幕。但是,我仍然得到一个Windows身份验证提示。我想我错过了指南中的一些最后步骤,这些步骤需要完成才能使其发挥作用,但我无法弄清楚是什么 安装程序 实例名称:SQL2016 Reporting Services配置管理器中设置的URL: 采取的配置步骤 在我遵循自述的地方做了以下更改: RSReportServer.config: 将Authen
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
用新数据替换用户界面:
<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>
/页面/UILogon.aspx
假的
sqlAuthCookie
http://computername/Reports
估计
将安全扩展信息替换为:
<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:
为Reporting services添加了与Web.config中相同的验证和解密密钥
<system.web>
<machineKey validationKey="GENERATED_VALIDATION_KEY" decryptionKey="GENERATED_DECRYPTION_KEY" validation="AES" decryption="AES" />
</system.web>
将文件复制到正确的位置
C:\Program Files\Microsoft SQL Server\MSRS13.SQL2016\Reporting Services\RSWebApp:
3.将Microsoft.Samples.ReportingServices.CustomSecurity.dll复制到/bin我正在使用Power BI运行SSRS的预览版本,预览不支持多个实例 当我更改了C:\Program files\Microsoft SQL Server Reporting Services\RSServer\ReportServer中的文件,然后重新启动“SQL Server Reporting Services-Standalone”时,我得到了登录提示
参考:我必须将MachineKey从Microsoft.ReportingServices.Portal.WebHost.exe.config文件(RSWebApp目录)复制到web.config文件(ReportServer目录)