我可以使用文件系统链接服务成功连接到本地计算机。但是现在,当我尝试使用类似方法从网络驱动器访问文件夹时,无法继续。请谁能告诉我我要去哪里错了?
下面是从本地计算机连接时的工作版本。
{
"name": "Test_FileSystem",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "D:\\AZURE_FS",
"userId": "<xxx@org.com>",
"encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiI0ZDYwMWI1Yi02YmI3LTRlN2YtOTBmYi0xNmIzZjI1MzQ3ZjciLC=="
},
"connectVia": {
"referenceName": "IR-FS-DEV",
"type": "IntegrationRuntimeReference"
}
}
}
但是,当我使用类似的方法并尝试连接到网络驱动器时,我的连接失败了。
{
"name": "NetworkDrive_LS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "\\\\<host>:<port>\\SD\\AZURE_FS",
"userId": "<userid>",
"encryptedCredential": "eyJDcmVkZW50aWFsSW=="
},
"connectVia": {
"referenceName": "ServerIR-VM",
"type": "IntegrationRuntimeReference"
}
} }
此外,我正在使用自托管IR。我做错什么了吗?我的错误如下:
不支持文件路径\\<host>:<port>\SD\AZURE_FS
。检查配置以确保路径有效。不支持指定路径的格式。
答案 0 :(得分:2)
好像我发现了我的错误-
中的示例{
"name": "FileLinkedService",
"properties": {
"type": "FileServer",
"typeProperties": {
"host": "<host>",
"userid": "<domain>\\<user>",
"password": {
"type": "SecureString",
"value": "<password>"
}
},
"connectVia": {
"referenceName": "<name of Integration Runtime>",
"type": "IntegrationRuntimeReference"
}
}
}
我更改为用户标识添加域,并且还删除了端口号。解决了。
{
"name": "NetworkDrive_LS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "\\\\<host>\\SD\\AZURE_FS",
"userId": "<domain>\\<user>",
"encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiIwY=="
},
"connectVia": {
"referenceName": "ServerIR-VM",
"type": "IntegrationRuntimeReference"
}
}
}