提问人:Paulo Felicio 提问时间:4/11/2019 最后编辑:CommunityPaulo Felicio 更新时间:4/11/2019 访问量:87
尝试从 SharePoint 页面下载文件时出错
Getting error while trying to download a file from a SharePoint page
问:
我正在 SSIS 中制作一个脚本任务,以连接到 Sharepoint 网页并从那里下载文件。该脚本是 C# 语言,它正在抛出一个 execption。
当我执行它时,我收到错误:
Microsoft.SqlServer.ManagedDTS.dll 中发生类型为“System.NullReferenceException”的异常,但未在用户代码中处理
附加信息:对象引用未设置为对象的实例。
这是什么意思?
string FilePath = Dts.Variables["User::FilePath"].Value.ToString();
object obj = Dts.Connections["HTTP Connection Manager 1"].AcquireConnection(null);
HttpClientConnection HTTPConnection = new HttpClientConnection(obj);
HTTPConnection.DownloadFile(FilePath, true);
Dts.TaskResult = (int)ScriptResults.Success;
答: 暂无答案
评论