当前位置: 首页 > news >正文

实现Reporting Service2008 的匿名访问(亲测可行)

  实现Reporting Service2008 的匿名访问是件比较费劲的事情,网上提供的方法挺多的,但总结起来起来能用的就三种:

  一种通过ReportViewer控件显示报表,在系统中添加一个专用用户,权限限制在浏览级别,然后在代码中实现身份接口,指定控件以该用户身份登录,这是变相的匿名访问;(详细见http://www.cnblogs.com/lonely7345/archive/2010/01/10/1643603.html)

  第二种是通过WebService来访问报表,是本人一篇博文(http://www.cnblogs.com/dege301/archive/2009/09/04/1560456.html)中介绍方法的衍生,细节不在说明,类似于第一种方法需要指定专门用户,也不是真正意义上的匿名访问;

  第三种就是MSDN上能找到的那种,更改4个配置文件并添加一个.dll文件,经本人测试,如果完全按照给的说明操作不可行,会出现“报表服务器配置错误”,但经过一些列改动之后该方法可行,并且是真正意义上的匿名访问,将在下文中给出详细步骤。

  

涉及到的配置文件如下(目录视具体安装情况):

1.         C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer下的web.configrsreportserver.configrssrvpolicy.config

2.         C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager下的web.config

注意:在配置之前先备份以上文件,以防失败!!!

 

配置过程:

1.         找到两个Web.config文件中的如下代码:

<authentication mode="Windows" />

<identity impersonate="true" />

替换成:

<authentication mode="None" />

 <identity impersonate="false"/>

2.         找到rsreportserver.config文件中的如下代码:

    <Authentication>

       <AuthenticationTypes>

           <RSWindowsNegotiate/>

           <RSWindowsNTLM/>

       </AuthenticationTypes>

       <EnableAuthPersistence>true</EnableAuthPersistence>

    </Authentication>

    替换成:

             <Authentication>

        <AuthenticationTypes>

            <Custom/>

        </AuthenticationTypes>

        <EnableAuthPersistence>true</EnableAuthPersistence>

</Authentication>

3.   把文件Microsoft.Samples.ReportingServices.AnonymousSecurity.dll放到C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin目录下(注意:目录视具体安装情况而定)

4.         找到rsreportserver.config文件中的如下代码:

<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.         找到文件rssrvpolicy.config中的如下代码:

</NamedPermissionSets>

                    <CodeGroup

                            class="FirstMatchCodeGroup"

                            version="1"

                            PermissionSetName="Nothing">

                        <IMembershipCondition

                                class="AllMembershipCondition"

                                version="1"

                        />

    在后面添上如下代码(注意Url地址可能不同):

<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.MSSQLSERVER2008\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll" />

                        </CodeGroup>

6.         重启Reporting Service服务。

 

转载于:https://www.cnblogs.com/dege301/archive/2010/04/09/1708103.html

相关文章:

  • Reporting Service 学习笔记3 2010,0409
  • win7 与visual stdio 不兼容怎么办
  • [转]为DropdownList设置空白选项
  • ArcSDE vs. Oracle Spatial 14
  • 菜单扩展
  • Windows Phone 7的商务功能依然精彩
  • oracle客户端plsql设置(windows7)
  • 什么是云计算 以及能给我们带来什么
  • 字符串反序
  • Windows Phone 7: A New Kind of Phone
  • 跟我学做c#皮肤美化(五)
  • ADO.NET Entity Framework学习笔记(5)ESQL查询语句
  • Windows Phone 7 + Zune 特性视频广告一则
  • 转:Oracle varchar, varchar2的区别
  • ArcSDE vs. Oracle Spatial 15
  • [nginx文档翻译系列] 控制nginx
  • 0基础学习移动端适配
  • android高仿小视频、应用锁、3种存储库、QQ小红点动画、仿支付宝图表等源码...
  • Android交互
  • Java 内存分配及垃圾回收机制初探
  • JavaScript中的对象个人分享
  • LeetCode29.两数相除 JavaScript
  • Spark RDD学习: aggregate函数
  • yii2权限控制rbac之rule详细讲解
  • 观察者模式实现非直接耦合
  • 基于Vue2全家桶的移动端AppDEMO实现
  • 经典排序算法及其 Java 实现
  • 盘点那些不知名却常用的 Git 操作
  • 前端性能优化--懒加载和预加载
  • 人脸识别最新开发经验demo
  • 深度解析利用ES6进行Promise封装总结
  • 深度学习中的信息论知识详解
  • 适配mpvue平台的的微信小程序日历组件mpvue-calendar
  • 责任链模式的两种实现
  • 3月7日云栖精选夜读 | RSA 2019安全大会:企业资产管理成行业新风向标,云上安全占绝对优势 ...
  • ​决定德拉瓦州地区版图的关键历史事件
  • #stm32驱动外设模块总结w5500模块
  • (八)Flask之app.route装饰器函数的参数
  • (六) ES6 新特性 —— 迭代器(iterator)
  • (原創) 如何使用ISO C++讀寫BMP圖檔? (C/C++) (Image Processing)
  • (最优化理论与方法)第二章最优化所需基础知识-第三节:重要凸集举例
  • ***测试-HTTP方法
  • ***通过什么方式***网吧
  • ./include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’: ./incl
  • .NET Compact Framework 3.5 支持 WCF 的子集
  • .net core Swagger 过滤部分Api
  • .NET 材料检测系统崩溃分析
  • .NET 跨平台图形库 SkiaSharp 基础应用
  • .NET 设计模式—简单工厂(Simple Factory Pattern)
  • .NET6使用MiniExcel根据数据源横向导出头部标题及数据
  • .netcore 如何获取系统中所有session_如何把百度推广中获取的线索(基木鱼,电话,百度商桥等)同步到企业微信或者企业CRM等企业营销系统中...
  • .net遍历html中全部的中文,ASP.NET中遍历页面的所有button控件
  • .net程序集学习心得
  • .net开发引用程序集提示没有强名称的解决办法
  • .vue文件怎么使用_我在项目中是这样配置Vue的