none
Web Service threw an error during method execution Using HTTP Connection Manager/Web Service Task RRS feed

  • Question

  • First my configuration:

    Microsoft Visual Studio Enterprise 2015
    Version 14.0.25431.01 Update 3
    Microsoft .NET Framework
    Version 4.7.03062SQL

    Server Analysis Services   14.0.1016.232
    SQL Server Data Tools   14.0.61712.050
    SQL Server Integration Services 14.0.1000.169
    SQL Server Reporting Services   14.0.1016.232

    The problem:

    I have an SSIS task that calls a web service using an HTTP Connection Manager. It runs on my machine and on a deployed server just fine. We are standing up a NEW server and moved the task to that server. Now it throws the following error on that server:

    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: The underlying connection was closed: An unexpected error occurred on a receive..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

    I checked thru IE that I can navigate to the wsdl file. I'm running the task under the same account on both servers. I recreated the HTTP Connection. I'm not sure where to go with this. I'm guessing it is some configuration on the new server, but I don't know what to change. 

    Friday, September 13, 2019 2:03 PM

All replies

  • Hi there,

    Ensure the HTTP port (80 and 8080) is open for communications. If the Web Service is remote and written in house ensure it allows CORS (not same origin allowed).


    Arthur

    MyBlog


    Twitter

    Friday, September 13, 2019 2:42 PM
    Moderator
  • Hi Whalensdad,

    The following link will be helpful.

    Tip: The underlying connection was closed: An unexpected error occurred on a receive

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, September 16, 2019 9:16 AM
  • Hi Whalensdad,

    The following link will be helpful.

    Tip: The underlying connection was closed: An unexpected error occurred on a receive

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    I'll have to disagree, unless the server receiving the SOAP request can determine which server is sending the request. The receiving server is replying to all other requests from other servers.
    Monday, September 16, 2019 11:24 AM
  • Hi there,

    Ensure the HTTP port (80 and 8080) is open for communications. If the Web Service is remote and written in house ensure it allows CORS (not same origin allowed).


    Arthur

    MyBlog


    Twitter


    We've done this and it had no effect. We're going to try tracing packets later today.
    Monday, September 16, 2019 11:26 AM
  • We were able to fix the issue by enabling TLS 1.0, 1.1 on the server making the request. This brings up a big issue. The company is disbaling TLS 1.0 and 1.1 due to security issues. I know that in a script task I can target a .net version greater than 4.6 and add in the following line of code, which works for communication between servers. 

    System.Net.ServicePointManager.SecurityProtocol = Net.SecurityProtocolType.Tls12

    However, there is no way to enable a different TLS setting in the Web Service Task, nor is there a way that I have found to make the above changes to a script transformation editor. Any suggestions would be appreciated.

    Monday, September 16, 2019 2:59 PM
  • Hi Whalensdad,

    Many SSIS Tasks were not updated to keep up with the technology changes.

    You can try to use SSIS Script Task to call a Web Service. This way you will have a full control.



    Monday, September 16, 2019 3:16 PM
  • Hi Whalensdad,

    Many SSIS Tasks were not updated to keep up with the technology changes.

    You can try to use SSIS Script Task to call a Web Service. This way you will have a full control.



    The issue is using the script task as a source in a Script Transformation of a data flow. I tried adding the above code to the PreExecute but that didn't work. I also tried in the add rows section. I'm not sure how I can use the script task at the Control Flow level to call the web service and retrieve  a file that I can then consume in the Data Flow level. Can point me to any posts that show calling the web service at the control flow to create a file for later consumption?
    Monday, September 16, 2019 3:44 PM
  • Monday, September 16, 2019 4:54 PM