reporting service 2016 匿名訪問配置

reporting service 2016 匿名訪問配置

一、修改配置文件

需要修改的配置文件目錄C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\ReportingServices\ReportServer,具體看自己服務器的實際路徑

  1. 修改 web.config
找到:
    <authentication mode="Windows" />
    <identity impersonate="true" />
修改爲:
	<authentication mode="None" />
	<identity impersonate="false"/>
  1. 修改rsreportserver.config
1.找到:
	<Authentication>
		<AuthenticationTypes>
			<RSWindowsNTLM/>
		</AuthenticationTypes>
		<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
		<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
		<EnableAuthPersistence>true</EnableAuthPersistence>
	</Authentication>
修改爲:
    <Authentication>
        <AuthenticationTypes>
            <Custom/>
        </AuthenticationTypes>
		<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
        <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
        <EnableAuthPersistence>true</EnableAuthPersistence>
	</Authentication>

2.找到:
	<Security>
		<Extension Name="Windows" Type="Microsoft.ReportingServices.Authorization.WindowsAuthorization, Microsoft.ReportingServices.Authorization"/>
	</Security>
	<Authentication>
		<Extension Name="Windows" Type="Microsoft.ReportingServices.Authentication.WindowsAuthentication, Microsoft.ReportingServices.Authorization"/>
	</Authentication>
修改爲:
    <Security>
        <Extension Name="None" Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.Authorization, Microsoft.Samples.ReportingServices.AnonymousSecurity" />
    </Security>
    <Authentication>
        <Extension Name="None" Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.AuthenticationExtension, Microsoft.Samples.ReportingServices.AnonymousSecurity" />
    </Authentication>
  1. 修改rssrvpolicy.config
找到最後一個codegroup標籤增加:
  <CodeGroup 
		class="UnionCodeGroup"  
		version="1"                                                               
		PermissionSetName="FullTrust"  
		Name="Private_assembly" 
		Description="This code group grants custom code full trust.">                            
	<IMembershipCondition 
			class="UrlMembershipCondition"       
			version="1"  
			Url="C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll" 
			/>
  </CodeGroup>

二、添加自定義安全擴展插件

將Microsoft.Samples.ReportingServices.AnonymousSecurity.dll 放置 C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\ReportingServices\ReportServer\bin目錄。
此dll文件需要自己尋找,或者按照微軟官方提供的方式https://github.com/microsoft/Reporting-Services自己寫,如果需要的人多的話考慮放到共享盤讓大家下載

三、重啓report service測試

注:此方式只在report service 2016試過,其他版本的服務未嘗試過。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章