c# - 无法将类型 'string' 隐式转换为 'Microsoft.Azure.Management.DataFactory.Models.SecretBase'

标签 c# .net azure azure-data-factory

我正在使用 .NET 和 Azure 数据工厂的 SqlServerLinkedService 开发 ETL 解决方案,作为从本地 SQL Server 到 Azure 的数据移动的一部分。

我无法设置密码属性,因为它的类型为 SecretBase,没有任何属性/构造函数:

enter image description here

有人知道如何设置这个属性吗?

下面是我的代码:

enter image description here

最佳答案

奇怪的是,这似乎只在 the Azure Python docs 中得到解释。

SecretBase class

The base definition of a secret type.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SecureString, AzureKeyVaultSecretReference

所以你可以使用Azure SecureString implementation设置该值,因为它继承自 SecretBase

关于c# - 无法将类型 'string' 隐式转换为 'Microsoft.Azure.Management.DataFactory.Models.SecretBase',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55829314/

相关文章:

c# - Visual Studio for mac C#语言版本

c# - 在类型 'id' : UWP (Windows 10 app) 上找不到 'PackingList.Models.Reis' 成员

.net - 命名列 "Operation could destabilize the runtime"时使用Dapper和 'Id'

Azure WebApp - 版本控制的配置/用户数据与应用程序分开部署

.net - 如何参与Azure平台的Beta测试?

asp.net - 什么是 SkipExtraFilesOnServer?部署 azure 。 ASP.NET vNext

c# - 复杂模型/子模型验证 (MVC) 的最佳方法

C# var 有强类型吗?

c# - using 和 await using 有什么区别?我如何决定使用哪一个?

c# - 窗口服务如何正确地将消息写入事件日志?