【问题标题】:SSRS 2010 - Reporting Services SOAP API Insufficient permissions errorSSRS 2010 - Reporting Services SOAP API 权限不足错误
【发布时间】:2018-06-24 11:48:43
【问题描述】:
  1. 我有一个报表服务器 URL - http://server_name/ReportServer/ReportService2010.asmx

  2. 我正在尝试使用 C# 控制台应用程序访问服务

  3. 我的控制台应用程序代码,带有报告服务器的名为 ReportsService 的服务引用,代码在这里 -

    static void Main(string[] args)
    {
    
        ReportsService.ReportingService2010SoapClient proxy = new ReportsService.ReportingService2010SoapClient();
        proxy.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
        proxy.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
        //proxy.ClientCredentials = "";
    
    
        try
        {
            ReportsService.Schedule[] schedule;
    
            ReportsService.TrustedUserHeader trustedHeader = new ReportsService.TrustedUserHeader();
            string siteURL = null;
    
            proxy.ListSchedules(trustedHeader, siteURL, out schedule);
    
    
        }
        catch (Exception e)
        {
    
            throw;
        }
    }
    

    }

  4. 我在执行 proxy.ListSchedules() 时收到此错误消息 -

{"授予用户 'DOMAIN\user.name' 的权限不足 用于执行此操作。 ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: 授予用户 'DOMAIN\user.name' 的权限不足 用于执行此操作。"}

  1. App.config 文件是 -

    <bindings>
        <basicHttpBinding>
          <binding name="ReportingService2010Soap">
            <security mode="TransportCredentialOnly">
              <transport clientCredentialType="Ntlm"></transport>
            </security>
          </binding>  
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://server_name:80/ReportServer/ReportService2010.asmx"
            binding="basicHttpBinding" bindingConfiguration="ReportingService2010Soap"
            contract="ReportsService.ReportingService2010Soap" name="ReportingService2010Soap" />
    </client>
    

请告诉我如何解决此错误。

【问题讨论】:

    标签: reporting-services


    【解决方案1】:

    我通过在“站点设置”中为自己设置“系统用户”角色解决了这个问题。

    SSRS Site Settings

    Add System User Role

    【讨论】:

      猜你喜欢
      • 2014-11-13
      • 1970-01-01
      • 1970-01-01
      • 2014-09-18
      • 2022-11-10
      • 1970-01-01
      • 1970-01-01
      • 2014-10-24
      • 2021-01-18
      相关资源
      最近更新 更多