【问题标题】:WCF webservices access to Analysis Services (SSAS)WCF Web 服务访问 Analysis Services (SSAS)
【发布时间】:2011-07-29 10:57:36
【问题描述】:

我有 WCF WebService,它使用 AdomdConnection 访问多维数据集数据。 服务托管在 Sharepoint Server 2010 中。

我还有调用 WCF 服务并从客户端调用的 ASCX 网络服务(使用 javascript)。一切正常,但身份验证存在问题。 两种服务(ASCX 和 WCF)都托管在 Sharepoint 中。

我在访问多维数据集数据时从 WCF 服务收到异常:

Either the user, NT AUTHORITY\IUSR, does not have access to the GMS1106 database, or the database does not exist.

这就是我从 asmx 调用 WCF 网络服务的方式:

var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
var endpoint = new EndpointAddress(SPContext.Current.Web.Url + GmsConfigurationReader.Current.GetParameter("OlapWebserviceEnpoint"));
var channelFactory = new ChannelFactory<IDataAccessService>(binding, endpoint);
channelFactory.Credentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
channelFactory.Credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
var client = channelFactory.CreateChannel();
hyperlink = client.GetFacilityHyperlink("Quarter 2 2011", "Center/Eastern Europe", "Cracow", "Machine Time Utilization");

Sharepoint appool 使用具有多维数据集权限的身份运行。

总结一下:

  • 这是我访问 WCF 服务的方式:JavaScript (client) -&gt; ASCX -&gt; WCF -&gt; CUBE - 没有问题(一切都托管在 Sharepoint 2010 中)
  • WCF 出于某种原因使用内置帐户而不是用户凭据

我已经检查过了,如果我授予多维数据集的 NT AUTHORITY\IUSR 权限,一切正常,但我真的不想这样做。

【问题讨论】:

    标签: c# wcf web-services sharepoint ssas


    【解决方案1】:

    听起来好像与 IIS 有关。两个可能有效的选项是,

    关闭匿名身份验证并打开 Windows 身份验证(这仅适用于 kerberose,除非 Web 服务与 SSAS 部署在同一个盒子上,并且用户必须有权访问多维数据集)。

    关闭匿名身份验证并打开模拟。这仅在 apppool 有权访问多维数据集时才有效。

    【讨论】:

      猜你喜欢
      • 2017-12-14
      • 1970-01-01
      • 2017-12-08
      • 1970-01-01
      • 2011-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多