C# 连接到OLAP 错误
用C#连接到OLAP 在
connection.Open();
报错如下
Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException was caught
HResult=-2146233088
Message=A connection cannot be made. Ensure that the server is running.
Source=Microsoft.AnalysisServices.AdomdClient
StackTrace:
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
at GetOlap.Program.Main() in d:\Users\huangwb\Documents\Visual Studio 11\Projects\GetOlap\GetOlap\Program.cs:line 23
InnerException: System.IO.IOException
HResult=-2146232800
Message=Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。.
Source=System
StackTrace:
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream stream, Byte[] buffer, Int32 length)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader()
at Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
at Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord()
at Microsoft.AnalysisServices.AdomdClient.TcpStream.GetResponseDataType()
InnerException: System.Net.Sockets.SocketException
HResult=-2147467259
Message=远程主机强迫关闭了一个现有的连接。
Source=System
ErrorCode=10054
NativeErrorCode=10054
StackTrace:
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
InnerException:
请问是什么原因?