设为首页 收藏本站
查看: 736|回复: 0

[经验分享] 匿名访问Reporting Service 2008

[复制链接]

尚未签到

发表于 2016-5-22 08:41:03 | 显示全部楼层 |阅读模式
  我想通过访问Url的方式,把部署到Sql Server  Reporting Service 上的报表集成到Web应用中,但是直接访问地址总是要提示属于凭证,在网上找了几种方法都差不多,摘录一个:
  
ReportingService是个很强大的报表引擎!但实现Reporting Service2008 的匿名访问是件比较费劲的事情,网上提供的方法挺多的,但都不适用于使用URL方式访问。
RS2005依赖于IIS,可使用IIS的匿名账户进行匿名登录访问。而RS2008不依赖于IIS,即无法通过IIS的匿名账户进行访问,也就是你访问需要输入有效的用户名及密码。
被逼无奈求助谷歌大神!找到一篇“Anonymous access in SQL RS 2008”的文章,仔细看看,根据内容进行配置。无奈没用,仔细研究找原因:“F××× You!!” 我装的是64位的MSSQL2008,我竟然在32位的目录下设置来,设置去,无奈我傻×了。找准对象重新来,“Bingo!” OK了!下面是设置方法。原文请见:http://blogs.msdn.com/b/jameswu/archive/2008/07/15/anonymous-access-in-sql-rs-2008.aspx
我这就就简单翻一下,做个记录。
1、找到RS2008的安装目录,如果你是64位系统,并且安装的是64位的MSSQL2008,并且是默认路径安装,请移步文件夹:C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQL2008\Reporting Services  否则请根据你自己的设置去找。
2、备份文件(注意文件夹):
①\ReportServer\web.config
②\ReportServer\rssrvpolicy.config
③\ReportServers\rsreportserver.config
④\ReportManager\Web.config
3、修改①、④两个文件
查找:

<authentication mode="Windows" />
<identity impersonate="true"/>
替换为:

<authentication mode="None" />
<identity impersonate="false"/>
4、修改③文件
查找:

<Authentication>
<AuthenticationTypes>
××××××××××××××××××××××××××××××××××××××
</AuthenticationTypes>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
替换为:

<Authentication>
<AuthenticationTypes>
<Custom/>
</AuthenticationTypes>
<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>
5、下载文件:AnonymousSecurity.dll 解压保存到目录“\ReportServer\bin\”文件夹下。
6、修改②文件
查找:

<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
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQL2008\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
/>
</CodeGroup>
到此为止配置结束,重启RS服务即可。


  还有几个网站,但只有一个英文站给了源码,但是我编译后没有效果,希望有心人能继续研究:英文资料:http://blogs.msdn.com/b/jameswu/archive/2008/07/15/anonymous-access-in-sql-rs-2008.aspx
  网友编译好的dll下载:http://files.cnblogs.com/zhukuanglong/ReportingServices.AnonymousSecurity.rar
  
  参考资料:
  http://blogs.msdn.com/b/jameswu/archive/2008/07/15/anonymous-access-in-sql-rs-2008.aspx
  http://wenzhen.me/2011/07/%E5%AE%9E%E7%8E%B0reporting-service2008%E5%8C%BF%E5%90%8D%E8%AE%BF%E9%97%AE%E7%9A%84%E6%96%B9%E6%B3%95/
  http://hi.baidu.com/liupras/blog/item/0041edea84fd64cbd439c924.html
  http://blog.sina.com.cn/s/blog_7778950d0100qa61.html
  http://www.fengfly.com/plus/view-172495-1.html
  
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-220140-1-1.html 上篇帖子: SQL Server 2008 start 下篇帖子: Visual Studio 2008 每日提示
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表