Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
来源:互联网 发布:android byte数组转int 编辑:程序博客网 时间:2024/05/22 00:31
SQL SERVER 2008 R2是微软目前最新的数据库版本,在之前的SQL SERVER2005中,我们可以通过修改IIS对应的SSRS站点及SSRS的配置文件,将SSRS配置成匿名登录的方式,把报表集成到系统中,而现在SSRS2008R2已经和IIS完全分离,所以说我们在沿用2005的配置方法是不可行的,为了让大家能够更好的了解,下面将先给大家简单介绍一下我在开发过程中,遇到的集成SSRS报表的场景。不同的集成有不同的解决方案。
3(1)、首先我们找到SSRS安装目录下的两个web.config配置文件,默认安装目录分别是(C:\ProgramFiles\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\ReportingServices\ReportServer和C:\Program Files\Microsoft SQLServer\MSRS10_50.MSSQLSERVER\ReportingServices\ReportManager),然后,找到两个配置文件中的
3(2)、找到(C:\Program Files\Microsoft SQLServer\MSRS10_50.MSSQLSERVER\ReportingServices\ReportServer)目录下的rsreportserver.config文件,找到配置文件中的
3(3)、在将dll放入到目录以后,我们来继续修改我们的配置文件,在(C:\ProgramFiles\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\ReportingServices\ReportServer)目录下,找到rssrvpolicy.config
1、ASP.net中集成SSRS的报表,这种集成方式,我们一般采用的方法是使用Reportviewer控件展示报表,在这种情况下,如果,我们不做任何的处理,客户端在访问我们的报表时会提示window身份验证的输入框,我们只有输入用户名和密码才能正常的访问报表,在这种场景下,如果,我们想去掉windows的验证框,我们可以实现SSRS的一个接口(IReportServerCredential),该接口提供报表的三种身份验证方式(WindowsCredential、NetWorkCrendtial、FormCredential),而我们要使用的就是第二种身份验证方式。我们需要实现接口中的方法,newNetWorkCredential(username,password,domain)然后将ReportViewer的Credential属性设置成我们实现接口类的对象,这样就间接的实现了我们的报表匿名登录。
当然,在第一种场景中,我们也可以使用SSRS的webservice,目前webservice的版本有2005、2010两个版本,直接将webservice添加引用即可(http://hostname:port/reportserver/reportservice2005.asmx或reportservice2010.asmx),这里就不详细说了。
2、第二种方式是在sharepoint中集成SSRS报表,这种方式,我们一般采用部署的方式,就可以解决SSRS访问权限的问题,我们一般采用将SSRS安装成,sharepoint集成模式的安装方式,这样SSRS就会继承sharepoint的权限管理,我们要做的就是做好sharepoint的权限控管就可以了。
3、第三种方式,也是我们今天着重要推荐的方式,是通过修改配置文件,以及添加程序集的方式,实现SSRS真正意义上的匿名登录。下面我把步骤介绍给大家。
<authentication
mode="windows"
/>
mode="windows"
/>
<identity
impersonate="true"
/>
impersonate="true"
/>
将其改为
<authentication
mode="None"/>
mode="None"/>
<identity
impersonate="false" />
impersonate="false" />
<Authentication>
<AuthenticationTypes>
<RSWindowsNegotiate/>
<RSWindowsNTLM/>
</AuthenticationTypes>
<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
<AuthenticationTypes>
<RSWindowsNegotiate/>
<RSWindowsNTLM/>
</AuthenticationTypes>
<RSWindowsExtendedProtect
<RSWindowsExtendedProtect
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
将其改为
<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<RSWindowsExtendedProtect
<RSWindowsExtendedProtect
<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>
Type="Microsoft.ReportingServices.Authorization.WindowsAuthorization,
Microsoft.ReportingServices.Authorization"/>
</Security>
<Authentication>
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>
Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.Authorization,
Microsoft.Samples.ReportingServices.AnonymousSecurity"/>
</Security>
<Authentication>
Type="Microsoft.Samples.ReportingServices.AnonymousSecurity.AuthenticationExtension,
Microsoft.Samples.ReportingServices.AnonymousSecurity"/>
</Authentication>
从上边两个节点中我们可以看出,我们需要引用一个dll文件,就是Microsoft.Samples.ReportingServices.AnonymousSecurity.dll,我们需要将这个dll放入到(C:\ProgramFiles\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\ReportingServices\ReportServer\bin)目录下。
找到
<CodeGroup
class="FirstMatchCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition class="AllMembershipCondition"
version="1" />
class="FirstMatchCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition class="AllMembershipCondition"
version="1" />
在其下边追加如下节点(红色部分,按照你的实际路径而定)
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Private_assembly" Description="This
code grou p grants custom
code full
trust.">
code
code full
trust.">
<IMembershipCondition class="UrlMembershipCondition"
version="1" Url="C:\Program
Files\Microsoft SQL
Files\Microsoft SQL
Server\MSRS10_50.MSSQLSERVER2008\Reporting
Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
/>
到此为止,我们匿名登录的方式,配置工作就完成了,下面我将在配置完成后访问报表时,出现的几种错误的解决方法说明一下。
1、在访问报表时,“出现数据源访问失败,提示,数据源是windows验证,而报表服务器禁止了windows验证。或使用特定用户认证”,这种错误,很明显是你的数据源设置的验证方式不对,打开你的数据源,选择“凭证”,选择“不使用凭证”。点击确定即可。如图:
注:如果你使用的数据集为Cube,在配置数据源时必须使用http的方式连接。
2、当我们修改了数据源不使用凭据后,我们需要给报表制定一个默认的执行账户,打开SSRS的配置管理,选择执行账户,设置一个系统中的账户,输入密码即可。如图:
- Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
- Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
- Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
- Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
- Microsoft SQL Server 2008 R2评估过期
- Microsoft® SQL Server® 2008 R2 Service Pack 1正式版
- Microsoft SQL Server 2008 R2 Express Service Pack1官方下载地址
- 启用 SQL Server 2008 R2 Service Broker
- SQL Server 2008 R2 Reporting Service 登录权限不足的问题
- SQL SERVER 2008 R2 报表服务器匿名访问方式
- Microsoft SQL Server 2008 R2 Enterprise安装指南
- Microsoft SQL Server 2008 R2学习(一)
- Microsoft SQL Server 2008 R2学习(二)
- 卸载Microsoft SQL Server 2008 R2 安装程序
- microsoft sql server 2008 r2 management studio 注释快捷键
- Microsoft SQL Server 2008 R2官方下载地址
- Microsoft SQL Server 2008 R2 数据导入导出
- Microsoft SQL Server 2008 R2完全卸载再安装手册
- 小程序.MoneyMenagement
- 查看linux 版本/内核
- 0×02:FPGA设计思想
- fckeditor 2.6.3中上传图片后将上传图片重命名为日期格式 .
- 给你无穷力量的,10句座右铭
- Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
- VC/MFC ListCtrl 控件功能使用汇总(转)
- 0×03:FPGA设计思想
- xiaochengxu .gf
- 煲机:让耳机的声音更动听!
- xiaochengxu.PriceNow
- xiaochengxu .ExcelReader
- 最近开发的基于libev的http网络库(libevhttp )
- 在其他机器无法运行程序编译出来的程序