无法在 SSIS Web 服务任务中加载文件或程序集错误

Could not load file or assembly error in SSIS Web Service Task

我正在尝试使用 SSIS 中的 Web 服务任务调用 Web 服务。在HTTP 连接管理器中我给了服务器URL,我没有定义任何代理服务器。我下载了 WSDL 文件。我在输入选项卡中选择了服务和方法。该方法需要一个我正在传递的字符串参数。我收到以下错误。我什至尝试将保护级别更改为 DontSaveSensitive,但仍然出现此错误。请帮忙

 Error: 0xC002F304 at Web Service Task, Web Service Task: An error 
 occurred with the following error message: 
 "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: 
 Could not execute the Web method. The error is: Could not load file or 
 assembly 'Microsoft.SqlServer.WebServiceTask, Version=14.100.0.0, 
 Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its 
 dependencies. The system cannot find the file specified.at  Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
 at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

在 windows8 中,程序集位于:C:\Windows\Microsoft.NET\assembly\GAC_MSIL

错误指出它在 Microsoft.SqlServer.WebServiceTask 中找不到文件或程序集。它还表示它正在寻找 Version=14.100.0.0 和 PublicKeyToken=89845dcd8080cc91。

我进入了以下路径:C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.WebServiceTask

有 3 个文件夹,但其中 none 个文件夹的名称中有版本 14。所以我创建了一个名为 "v4.0_14.100.0.0__89845dcd8080cc91"

的新文件夹

然后我将 Microsoft.SqlServer.WebServiceTask DLL 从 v4.0_13.0.0.0__89845dcd8080cc91 文件夹复制到新文件夹 (v4.0_14.100.0.0__89845dcd8080cc91).这对我有用。

执行以下操作:-

  1. 通过右键单击并查找配置属性转到项目属性。
  2. 转到常规并检查 SQL 的 TargetServerVersion 是什么。在我的例子中,它是 SQL Server vNext,但我的机器上有 SQL Server 2014。
  3. 从下钻来看,select 合适的 SQL 服务器版本。将出现提示。单击“确定”。
  4. 保存更改,重建应用程序,运行 应用程序,您会看到一切正常。

一些补丁已应用到服务器,但由于某种原因它无法访问互联网。 刷新 dns 为我们解决了这个问题。