AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 303900
Accepted
jdids
jdids
Asked: 2021-12-14 13:01:59 +0800 CST2021-12-14 13:01:59 +0800 CST 2021-12-14 13:01:59 +0800 CST

匿名访问 SSRS 报告

  • 772

我们希望 RaspberryPi 在 kiosk 模式下运行,并在没有任何用户交互的情况下自动在我们的 SSRS 门户上提取报告。

我希望我可以允许匿名访问此特定报告,并为我们的其他报告/文件夹保留 Active Directory 身份验证。

我已将“NT AUTHORITY\ANONYMOUS LOGON”添加到报告安全性中,但没有任何运气。

我想做的事可能吗?

我们正在运行 MSSQL 2019。

sql-server ssrs
  • 2 2 个回答
  • 1727 Views

2 个回答

  • Voted
  1. Best Answer
    jdids
    2022-05-19T06:45:23+08:002022-05-19T06:45:23+08:00

    更新为有人要求我发布作为答案。

    我找到了解决办法。这不是匿名身份验证,而是使用 HTTP 基本身份验证将 Windows 凭据传递给 SSRS

    这是我使用的指南: https ://tickett.wordpress.com/2014/12/03/anonymous-authentication-sql-server-reporting-services/?unapproved=9854&moderation-hash=4bf90332f3468fc8b78f6b84e1e63d6d#comment-9854

    我发现我必须使用这个工具而不是他们建议的工具(http://www.swingnote.com/tools/texttohex.php)并使用“十六进制编码的 URL”

    如果无法访问该网站,请参阅原始文章中概述的分步过程。

    在下面创建此文件以放置在您的 SSRS Web 服务器或此位置的另一个 IIS 服务器的根目录中:C:\inetpub\wwwroot. 给它一个唯一的名字,这样你就可以记住 URL 并将它保存为一个 .html 文件(让我们your_report.html在这个例子中调用它。)确保阅读代码中的注释

    <html>
      <head>
       <script>
    
    // use this website to convert a user account and password to view reports into hex (https://www.swingnote.com/tools/texttohex.php)
    // Do not use your domain as the prefix, just an AD user name. Best practice would be to create an account that only has read privileges to this report only 
    // use hex encoded for URL for this
    //       First section is the username     |   Second section is the password
    
    var _0x1751=["\x61\x66","\x76\x76"];
    
    function getHTTPObject() {
        if (typeof XMLHttpRequest != 'undefined') {
            return new XMLHttpRequest();
        }
        try {
            return new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                return new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
        return false;
    }   
    
    function runReport() {
      var http = getHTTPObject();
    
    
    // Here is the section for the report you want to use
      var url= "http://<your_report_server>/ReportServer/Pages/ReportViewer.aspx?<report_name>&rs:Command=Render";
      http.onreadystatechange = function() {
        if (http.readyState == 4) {
          if (http.status == 401) {
            runReport(); 
          }
          if (http.status == 200) {
            document.location = url;
          }
        }
      };
      http.open("get", url, true, _0x1751[0x0], _0x1751[0x1]);
      http.send(null);
      return false;
    }
        </script>
      </head>
      <body onload="runReport();">
      </body>
    </html>
    

    将文件保存到 后C:\inetpub\wwwroot,通过转到您的报表服务器 ( http://<report_server_name>/your_report.html)对其进行测试

    • 1
  2. Kearl
    2022-05-18T21:11:31+08:002022-05-18T21:11:31+08:00

    我发现完成您所要求的最有用的文章是Swarndeep Singh在 SQL Server 2008 R2 中为 Reporting Services 设置匿名访问:

    • 将 rsreportserver.config 中的身份验证模式更改为自定义
    • 将 ReportServer 中 web.config 文件中的身份验证模式更改为无。还将模拟更改为假。
    • 将此位置的代码编译为 Microsoft.Samples.ReportingServices.AnonymousSecurity.dll 的代码到 bin 文件夹,或者从该位置复制代码并将其粘贴到 ReportServer 的 bin 文件夹中。
    • 在 rsreportserver.config 中添加扩展
    • 在安全标签中添加附加扩展
    • 在 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="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.AnonymousSecurity.dll"
    />
    </CodeGroup>
    

    重新启动报告服务,匿名访问应该可以工作。

    • -1

相关问题

  • SQL Server - 使用聚集索引时如何存储数据页

  • 我需要为每种类型的查询使用单独的索引,还是一个多列索引可以工作?

  • 什么时候应该使用唯一约束而不是唯一索引?

  • 死锁的主要原因是什么,可以预防吗?

  • 如何确定是否需要或需要索引

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve