SQL SERVER 2008 R2 是微軟目前最新的數據庫版本,現在SSRS2008 R2已經和IIS完全分離,每次通過IE URL方式訪問報表 會彈出登錄憑證,很是厭煩!
(1)、首先我們找到SSRS安裝目錄下的兩個web.config配置文件,
默認安裝目錄分別是(C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer和C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager),然后,找到兩個配置文件中的
<authentication mode="windows" /> <identity impersonate="true" /> 將其改為 <authentication mode="None"/> <identity impersonate="false" />
(2)、找到(C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer)目錄下的rsreportserver.config文件,找到配置文件中的
<Authentication> <AuthenticationTypes> <RSWindowsNegotiate/> <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>
然后找到配置文件中的
<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>
從上邊兩個節點中我們可以看出,我們需要引用一個dll文件,就是Microsoft.Samples.ReportingServices.AnonymousSecurity.dll,我們需要將這個dll放入到
(C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin)目錄下。
(3)、在將dll放入到目錄以后,我們來繼續修改我們的配置文件,
在(C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer)目錄下,找到rssrvpolicy.config
找到
<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 class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL
Server\MSRS10_50.MSSQLSERVER2008\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll" />
</CodeGroup>
到此為止,我們匿名登錄的方式,配置工作就完成了!
當我們修改了數據源不使用憑據后,我們需要給報表制定一個默認的執行賬戶,打開SSRS的配置管理,選擇執行賬戶,設置一個系統中的賬戶,輸入密碼即可。
如圖:

DLL 不知道怎么發!
給個下載地址吧:http://download.csdn.net/download/jiaodacailei/2776823
主要是工作碰到要解決這個問題.記錄個!