Could not load file or assembly error in SSIS web service task
I am trying to call a web service using a web service task in SSIS. In the HTTP connection manager, I gave the server url, I did not define the proxy. I have downloaded the WSDL file. And I selected Service and Method in the Login tab. The method expects a string parameter, which I pass. I am getting the following error. I even tried changing the protection level to DontSaveSensitive but still get this error. Please, help
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()".
On Windows 8, assemblies are located at: C: \ Windows \ Microsoft.NET \ assembly \ GAC_MSIL
The error indicates that it cannot find the file or assembly in Microsoft.SqlServer.WebServiceTask. And it also says that it is looking for version = 14.100.0.0 with PublicKeyToken = 89845dcd8080cc91.
I went down the following path: C: \ Windows \ Microsoft.NET \ assembly \ GAC_MSIL \ Microsoft.SqlServer.WebServiceTask
And there were 3 folders, but none of them had Version 14 in their name. So I created a new folder called "v4.0_14.100.0.0__89845dcd8080cc91"
And I copied the DLL Microsoft.SqlServer.WebServiceTask from v4.0_13.0.0.0898945dcd8080cc91 folder to a new folder (v4.0_14.100.0.0__89845dcd8080cc91). This worked for me.
Follow these steps: -
- Go to project properties by right clicking and open "Configuration Properties".
- Go to General and check what the TargetServerVersion SQL is. In my case it was SQL Server vNext, but I have SQL Server 2014 on my machine.
- Select the appropriate version of SQL Server from the dropdown list. A prompt will appear. Click OK.
- Save changes, rebuild the application, run the application and you will see that everything works well.
Some patches were applied to the server and for some reason it lost access to the internet. Flushing the dns solved that for us.