【问题标题】:'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'来自程序集“mscorlib,版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”的“System.Security.Principal.WindowsImpersonationContext”
【发布时间】:2021-05-16 10:46:19
【问题描述】:

我想根据下面的链接从我的 asp.netcore 项目 (.net 5) 连接到我的本地表格服务器 https://docs.microsoft.com/en-us/analysis-services/tom/connect-to-existing-analysis-services-tabular-server-and-database?view=asallproducts-allversions

string ConnectionString = "DataSource=localhost";

using var server = new Server();

server.Connect(ConnectionString);

Console.WriteLine("Connection established successfully.");
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Server name:\t\t{0}", server.Name);
Console.WriteLine("Server product name:\t{0}", server.ProductName);
Console.WriteLine("Server product level:\t{0}", server.ProductLevel);
Console.WriteLine("Server version:\t\t{0}", server.Version);
Console.ResetColor();
Console.WriteLine();

Console.WriteLine("Press Enter to close this console window.");

return Ok();

我在调用操作时收到此错误:

System.TypeLoadException: Could not load type System.Security.Principal.WindowsImpersonationContext from assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
   at Microsoft.AnalysisServices.IdentityResolver.Dispose()
   at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
   at Microsoft.AnalysisServices.XmlaClient.Connect(String connectionString, Boolean beginSession)
   at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
   at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId)
   at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString)

【问题讨论】:

    标签: c# .net ssas .net-5 tabular


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2015-09-09
      • 2021-12-17
      • 2016-12-14
      • 2013-07-12
      • 2015-04-01
      • 2017-03-07
      • 2018-02-05
      • 2016-11-19
      • 1970-01-01
      相关资源
      最近更新 更多