2011-07-29 29 views
0

我有WCF WebService使用AdomdConnection访问多维数据集数据。 服务托管在Sharepoint Server 2010内。WCF Web服务访问分析服务(SSAS)

我也有ASCX webservice,它调用WCF服务并从客户端调用(使用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的Web服务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运行使用Identity有对立方体的权限。

综上所述:

  • 这是我如何访问WCF服务:JavaScript (client) -> ASCX -> WCF -> CUBE - 并没有问题
  • WCF(一切都内2010 SharePoint中),由于某种原因,使用内置的帐户,而不是用户凭据

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

回答

0

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

关闭匿名身份验证并打开Windows身份验证(这只适用于Kerberose,除非Web服务部署在与SSAS相同的方框中,并且用户必须有权访问立方体)。

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