众所周知在ReportingService 2008中微软取消了匿名访问,我们再也不能像2005时那样靠修改IIS来实现匿名访问了。但在微软MSDN BLOG中还是提供了以下这种设置匿名访问的方式。
- 在sql server的安装目录中找到MSRS10.MSSQLSERVER\Reporting Services\ReportServer中的rsreportserver.config文件。查找 <Authentication>,并将其中内容修改为:
<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
- 打开在ReportServer与ReportManager文件夹中的web.config文件,修改其中内容:
<authentication mode="None" />
<identity impersonate="false"/>
- 将Microsoft.Samples.ReportingServices.AnonymousSecurity.dll拷贝到Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin目录中。
- 再次打开rsreportserver.config文件,查找<Security>与其下方的<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>
- 打开rssrvpolicy.config文件,在其中添加如下内容:
<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="D:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
/>
</CodeGroup>
- 重启ReportingService服务
Microsoft.Samples.ReportingServices.AnonymousSecurity.dll下载:/Files/ww3128/ReportingServices.AnonymousSecurity.rar