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
主要是工作碰到要解决这个问题.记录个!