我们有一个 WPF 应用程序,它从 Analysis Services Cube 中获取数据。客户端使用 ADOMD.NET 直接连接到数据库。
WPF 应用程序在现有的 Windows XP 机器上运行良好。但是,Windows 7 会引发以下错误:
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: The connection either timed out or was lost. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
我已将问题进一步缩小到有关如何使用 ADOMD.NET 检索数据的问题。据我了解,有4 种方法可以检索数据。只有当我使用 CellSet 时才会发生此错误。
事实上,我可以使用相同的 MDX 语句,它会导致上面的异常使用 XmlReader 返回数据。只有当我使用 CellSet 时才会抛出异常。
有任何想法吗?