簡體   English   中英

使用SSIS從TLS1.2站點下載文件

[英]File downloads from a TLS1.2 site using SSIS

我們當前的過程運行良好,並且能夠下載文件,直到站點決定切換到TLS 1.2協議為止。 現在,我們的文件下載不再起作用。

我們現有的解決方案基於此vb.net解決方案,並且似乎無法處理TLS下載。 我可以看到該文件,請連接到它,但無法下載。 有沒有辦法在VB.net或C#中處理此問題?

這對我有用:

    Imports System.Net

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

    Dim webclient As New WebClient

    webclient.BaseAddress = Dts.Variables("ServerURL").Value
    WebClient.Credentials = New NetworkCredential(Dts.Variables("ServerUsername").Value.ToString, Dts.Variables("ServerPassword").Value.ToString)

    Dim filename As String = "C:\Temp\Sample.txt"
    WebClient.DownloadFile(Dts.Variables("ServerURL").Value, filename)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM