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

3

5

I'm trying to call a web service using the Web Service Task in SSIS. In the HTTP connection Manager I gave the Server URL, I haven't defined any proxy server. I downloaded the WSDL file. And I selected the Service and Method in the Input tab. The method expects a string parameter which I am passing through. I'm getting the following error. I even tried changing the Protection Level to DontSaveSensitive but still getting 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()".
Multipara answered 8/5, 2017 at 13:4 Comment(2)
I have the same problem... did you find a solution?Specie
@Specie yes I did, please see my answer below.Multipara
M
4

In windows 8 the assemblies are located at: C:\Windows\Microsoft.NET\assembly\GAC_MSIL

The error states that it cannot find a 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 into the following path: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.WebServiceTask

And there were 3 folders but none of them had a Version 14 in its name. So I created a new folder with the name "v4.0_14.100.0.0__89845dcd8080cc91"

enter image description here

And I the copied Microsoft.SqlServer.WebServiceTask DLL from the v4.0_13.0.0.0__89845dcd8080cc91 folder to the new folder (v4.0_14.100.0.0__89845dcd8080cc91). This worked for me.

Multipara answered 5/6, 2017 at 13:9 Comment(1)
This doesn't seem like a principled solution. The solution from Sameer Sayani worked for me and has some reasoning behind it.Interosculate
R
6

Do the following:-

  1. Go to project properties by right clicking & look for Configuration Properties.
  2. Go to General and check what's the TargetServerVersion of SQL is. In my case it was SQL Server vNext but I am having SQL Server 2014 on my machine.
  3. From the drill down, select appropriate SQL Server version. A prompt will appear. Click OK.
  4. Save the changes, rebuild the application, run the application and you will see all working good.
Renfred answered 25/6, 2017 at 13:50 Comment(0)
M
4

In windows 8 the assemblies are located at: C:\Windows\Microsoft.NET\assembly\GAC_MSIL

The error states that it cannot find a 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 into the following path: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.WebServiceTask

And there were 3 folders but none of them had a Version 14 in its name. So I created a new folder with the name "v4.0_14.100.0.0__89845dcd8080cc91"

enter image description here

And I the copied Microsoft.SqlServer.WebServiceTask DLL from the v4.0_13.0.0.0__89845dcd8080cc91 folder to the new folder (v4.0_14.100.0.0__89845dcd8080cc91). This worked for me.

Multipara answered 5/6, 2017 at 13:9 Comment(1)
This doesn't seem like a principled solution. The solution from Sameer Sayani worked for me and has some reasoning behind it.Interosculate
M
0

Some patches had been applied to the server and it had lost it's internet access for some reason. Flushing the dns resolved this for us.

Marsupium answered 17/5, 2019 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.