1. 程式人生 > >SSRS2008 配置匿名登入的方法

SSRS2008 配置匿名登入的方法

按公司要求需要在ERP系統中嵌入 Server reports 

但是在訪問SSRS2008的報表時需要輸入帳號密碼才能訪問,在SSRS2008的管理介面中由沒有匿名訪問設定的地方,所以更改SSRS的配置檔案

修改的檔案清單如下:(個人路徑:C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\)

注:個人路徑看你自己實際安裝報表服務的路徑

(1)ReportServer\Web.config

(2)ReportServer\rsreportserver.config

(3)ReportServer\rssrvpolicy.config

(4)ReportManager\Web.config

步驟一:在(1)(4)檔案中找到該節點

<authentication mode="Windows" />
<identity impersonate="true"/>

修改成

<authentication mode="None" />
<identity impersonate="false"/>

步驟二(1):在(2)檔案中找到

<Authentication>
<AuthenticationTypes>
     <RSWindowsNegotiate/>
     <RSWindowsNTLM/>
</AuthenticationTypes>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>

修改成

<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<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>

步驟三:

下載Microsoft.Samples.ReportingServices.AnonymousSecurity.dll,

 將其放入C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin中

 下載地址:  https://download.csdn.net/download/qq_24886681/10731557

 

步驟四:修改(3)檔案

<CodeGroup 
class="FirstMatchCodeGroup version="1" 
PermissionSetName="Nothing"> 
<IMembershipCondition 
class="AllMembershipCondition" 
version="1" />

  在該節點下新增

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Private_assembly"
Description="This code group grants custom code full trust. ">
<IMembershipCondition
calss="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQL2008\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
/>
</CodeGroup>

 

步驟五:

重啟SSRS服務