我为SSAS配置了HTTP访问(msmdpump.dll),以便在线访问OLAP Cube,如下面的博客所示。现在可以通过提供适当的连接字符串,通过远程连接使用msmdpump.dll访问多维数据集。 https://msdn.microsoft.com/en-us/library/gg492140.aspx
同时,我试图通过JQuery.ajax()中的XML / A概念访问多维数据集,如下所示,
var MDX = " SELECT {[Date].[Fiscal] ON COLUMNS , {[Measures].[Customer Count]} ON ROWS FROM [Adventure Works] ;
$.ajax({
type: "POST",
url: "http://localhost:6078/olap/msmdpump.dll",
data: "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\"> <Header></Header> <Body> <Execute xmlns=\"urn:schemas-microsoft-com:xml-analysis\"> <Command> <Statement> " + MDX +" </Statement> </Command> <Properties> <PropertyList> <Catalog>Adventure Works DW Standard Edition</Catalog> </PropertyList> </Properties> </Execute> </Body> </Envelope>",
success: function (responce, textStatus, jqXHR) {
$('body').append(responce);
},
contentType: "text/xml",
dataType: "xml",
});
但它抛出“XMLHttpRequest无法加载http://localhost:6078/olap/msmdpump.dll。对于预检的响应具有无效的HTTP状态代码500“异常,因为我们错过了为IIS访问OLAP数据配置交叉orgin-domain支持。我通过提出以下论坛得到答案,
在这里,我成功地向IIS提供了交叉域,以便对OLAP应用程序目录(用于创建对msmdpump.dll的访问的节点)进行非身份验证访问,如下面的博客中所述。 http://www.igniteui.com/help/igolapxmladatasource-configuring-iis-for-cross-domain-olap-data#summary
最后我坚持以下异常,
“XMLHttpRequest无法加载http://localhost:6078/olap/msmdpump.dll。请求标题字段在预检响应中,Access-Control-Allow-Headers不允许使用Content-Type。“
请告诉我,
IIS是否还需要其他配置?
注意:此外,我还提供了对我的端口的网络访问(即连接字符串托管端口)。
答案 0 :(得分:2)
Problem is resolved for me after hosting my sample in IIS. While i am trying from "file:///C:/Users/prabus/Desktop/Sample/xmlaaccess.html" local path i can't able to access the msmdpump.dll(which is hosted in same machine). So, localhost is not accessible from local file path.