We have recently deployed our new website. We recommend using the new website as some features have been deprecated. The old website is still available till Sep. 30, 2018 and can be accessed here.

SSIS HttpClientConnection failed to download file via HTTP Connection Manager

Sunday, September 9, 2018 / mcchu28

Possibly save 1 hour of your time: There is an execute task that downloads file from a source URL and then I receive this error.

In the code, I use HttpClientConnection to download file from the HTTP Connection Manager.

        Dim nativeObject As Object = Dts.Connections("HTTP Connection Manager").AcquireConnection(Nothing)

        ' Create a new HTTP client connection
        Dim connection As New HttpClientConnection(nativeObject)

        connection.DownloadFile(dropLocation, True)

You many see this error when you debug the connection.DownloadFIle:
Exception from HRESULT: 0xC0016008

Right click the HTTP Connection Manager and choose edit.
Check Use credentials and click OK. Then edit again, this time uncheck Use credentials.

Behind the scene, there is a default password that is used. For some reason this causes the issue.
If you have source control, you can actually see the file may have changed the encrypted password on the HTTP Connection Manager.


This seems to fix my issue.