作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
WithAadUserPromptAuthentication 丢失,所以我无法使用 Microsoft 文档提供的示例代码?那是:
var serviceUri = "Service URI, typically of the form https://cluster.region.kusto.windows.net";
var authority = "contoso.com"; // Or the AAD tenant GUID: "..."
// Recommended syntax
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(serviceUri)
.WithAadUserPromptAuthentication(authority);
// Legacy syntax
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(serviceUri)
{
FederatedSecurity = true,
InitialCatalog = "NetDefaultDB",
Authority = authority,
};
// Equivalent Kusto connection string: $"Data Source={serviceUri};Database=NetDefaultDB;Fed=True;Authority Id={authority}"
是否有任何新的解决方案可以替代 WithAadUserPromptAuthentication 方法?
最佳答案
Microsoft.Azure.Kusto.Data.NETStandard 已弃用且不再维护。请使用 Microsoft.Azure.Kusto.Data 包(.Net Framework 和 .Net Core 风格)。
由于使用了身份验证库 (ADAL),此方法不适用于 .Net Core,仅适用于 .Net Framework 包。您可以在 .Net Core 中使用的解决方法是通过在 KustoConnectionStringBuilder 实例上手动设置以下属性来触发用户名/密码身份验证:FederatedSecurity、UserID、Password、Authority。
我们计划发布使用下一代身份验证库 (MSAL) 构建的软件包的新版本,该版本将在所有平台上公开此方法(交互式用户身份验证)。
关于c# - 如何用C#连接kusto数据库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63493019/
我是一名优秀的程序员,十分优秀!