久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

“驗證失敗,因為遠程方已關(guān)閉傳輸流"使用

quot;Authentication failed because the remote party has closed the transport streamquot; when transferring to/from FTP server over TLS/SSL using FluentFTP(“驗證失敗,因為遠程方已關(guān)閉傳輸流使用 FluentFTP 通過 TLS/SSL 向
本文介紹了“驗證失敗,因為遠程方已關(guān)閉傳輸流"使用 FluentFTP 通過 TLS/SSL 向/從 FTP 服務(wù)器傳輸數(shù)據(jù)時的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我在我的項目中使用 FluentFTP lib 來通過 TLS 使用 FTP,但這里有些麻煩.

I have used FluentFTP lib im my project to work with FTP via TLS, but some trouble here.

這段代碼運行良好:

using (var conn = new FtpClient("adress", "user", "password"))
{
    conn.EncryptionMode = FtpEncryptionMode.Explicit;
    conn.ValidateAnyCertificate = true;
    conn.Connect();

    conn.CreateDirectory("/test/path/that/should/be/created", true);
}

并創(chuàng)建了目錄.但在其他示例中,它效果不佳.

And directory were created. But in other examples it not working good.

第一個示例(日志文件 - https://pastebin.com/jNyZ3fmD):

First exmple (logfile - https://pastebin.com/jNyZ3fmD):

public static void DownloadFile()
{
    using (var conn = new FtpClient("adress", "user", "password"))
    {
        conn.EncryptionMode = FtpEncryptionMode.Explicit;
        conn.ValidateAnyCertificate = true;
            conn.Connect();

        conn.DownloadFile("localPath", "ftpPath", FtpLocalExists.Overwrite, FtpVerify.Retry);

    }
}

我有錯誤:

"將文件上傳到服務(wù)器時出錯.請參閱 InnerException 了解更多信息."IOException:身份驗證失敗,因為遠程方已關(guān)閉傳輸流

"Error while uploading the file to the server. See InnerException for more info." IOException: Authentication failed because the remote party has closed the transport stream

嘗試使用以下代碼從 FTP 獲取文件/目錄列表在控制臺中不返回任何內(nèi)容(日志文件 - https://pastebin.com/V8AiLs8k):

Trying to get file/dir-list from FTP using code below return nothing in console (logfile - https://pastebin.com/V8AiLs8k):

using (var conn = new FtpClient("adress", "user", "password"))
{
    //conn.Connect();
    conn.EncryptionMode = FtpEncryptionMode.Explicit;
    conn.ValidateCertificate += new FtpSslValidation(OnValidateCertificate);
    conn.Connect();

    // get a recursive listing of the files & folders in a specific folder
    foreach (var item in conn.GetListing())
    {
        switch (item.Type)
        {

            case FtpFileSystemObjectType.Directory:

                Console.WriteLine("Directory!  " + item.FullName);
                Console.WriteLine("Modified date:  " + conn.GetModifiedTime(item.FullName));

                break;

            case FtpFileSystemObjectType.File:

                Console.WriteLine("File!  " + item.FullName);
                Console.WriteLine("File size:  " + conn.GetFileSize(item.FullName));
                Console.WriteLine("Modified date:  " + conn.GetModifiedTime(item.FullName));
                Console.WriteLine("Chmod:  " + conn.GetChmod(item.FullName));

                break;

            case FtpFileSystemObjectType.Link:
                break;
        }
        Console.WriteLine(item);
    }

}

用戶有權(quán)下載、創(chuàng)建和刪除文件.但是我只能在服務(wù)器上創(chuàng)建一個目錄.

The user has the privilege to download, create and delete files. But I can only make a dir on server.

推薦答案

好像是因為 FluenFTP 缺少 TLS 會話恢復(fù)支持:
https://github.com/robinrodricks/FluentFTP/issues/347

It seems to be due to a lack of TLS session resumption support in FluenFTP:
https://github.com/robinrodricks/FluentFTP/issues/347

如果您與服務(wù)器所有者確認(rèn),您將不得不切換到另一個 FTP 庫.對于類似的問題(對于隱式 TLS,當(dāng)您使用顯式 TLS 時)請參閱:
在 C# 中使用 TLS 會話重用將文件上傳到隱式 FTPS 服務(wù)器

If you confirm that with the server owner, you will have to switch to another FTP library. For a similar question (for an implicit TLS, while you are using an explicit TLS) see:
Upload file to implicit FTPS server in C# with TLS session reuse

或者要求所有者關(guān)閉會話恢復(fù)要求(盡管從安全角度來看這很糟糕).

Or ask the owner to turn off session resumption requirement (though that's bad from a security point of view).

有關(guān)該問題的更多參考,另請參閱可以使用 FileZilla 或 WinSCP 連接到 FTP,但不能使用 FtpWebRequest 或 FluentFTP.

For more references about the problem, see also Can connect to FTP using FileZilla or WinSCP, but not with FtpWebRequest or FluentFTP.

這篇關(guān)于“驗證失敗,因為遠程方已關(guān)閉傳輸流"使用 FluentFTP 通過 TLS/SSL 向/從 FTP 服務(wù)器傳輸數(shù)據(jù)時的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發(fā)技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 亚洲欧美视频 | 精品av| 91久久久久久 | 日本精品一区二区 | 午夜国产一级 | 国产在线播放一区二区三区 | 日韩和的一区二在线 | 超碰在线人 | 国产精品久久久久aaaa | 成人在线免费网站 | 色婷婷一区二区三区四区 | 91麻豆精品国产91久久久久久 | 亚洲国产精品日本 | 国产激情视频网址 | 一二三四在线视频观看社区 | 中文在线日韩 | 成人久久久久久久久 | 综合久久99| 国精日本亚洲欧州国产中文久久 | 日本久久视频 | 欧美精品欧美精品系列 | 久久综合欧美 | 国产精品1区 | 欧美精品在线播放 | 中文字幕综合 | 久久免费精品 | 久草新在线 | 国产精品视频久久久 | 国产精品特级毛片一区二区三区 | 夜操 | 亚洲欧美激情四射 | 国产精品99精品久久免费 | 欧美精品久久久久 | 亚洲欧美综合网 | 国产精品精品3d动漫 | 日韩理论电影在线观看 | 日本精品在线一区 | 成人av观看| 狠狠爱网址 | 色婷婷国产精品 | 成人性视频免费网站 |