【发布时间】:2022-01-04 09:05:52
【问题描述】:
我正在尝试使用 LogicManagementClient 检索 Azure 逻辑应用操作的执行历史记录,但是得到“尝试将元素作为与数组不兼容的类型进行访问。”下一行的错误-
LogicManagementClient client = new LogicManagementClient(credentials) { SubscriptionId = "****" };
凭据对象已成功创建,我可以在调试时看到值 -
var credentials = SdkContext.AzureCredentialsFactory
.FromServicePrincipal("clientid",
"clientsecret",
"tenantid",
AzureEnvironment.AzureGlobalCloud);
下面是堆栈跟踪 -
System.ArrayTypeMismatchException
HResult=0x80131503
Message=Attempted to access an element as a type incompatible with the array.
Source=mscorlib
StackTrace:
at System.Collections.Generic.List`1.Add(T item)
at Microsoft.Azure.Management.Logic.LogicManagementClient.Initialize()
at Microsoft.Azure.Management.Logic.LogicManagementClient..ctor(ServiceClientCredentials credentials, DelegatingHandler[] handlers)
感谢任何解决此问题的建议。谢谢!
【问题讨论】:
标签: c# azure azure-logic-apps