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

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

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

問題描述

限時送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);
}

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

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);

    }
}

我有錯誤:

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

"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 獲取文件/目錄列表在控制臺中不返回任何內容(日志文件 - 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);
    }

}

用戶有權下載、創建和刪除文件.但是我只能在服務器上創建一個目錄.

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

推薦答案

好像是因為 FluenFTP 缺少 TLS 會話恢復支持:
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

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

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

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

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

有關該問題的更多參考,另請參閱可以使用 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.

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

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

相關文檔推薦

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 令牌授權不起作用)
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(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
.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(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 国产精品国产 | 成人1区2区 | 国产午夜精品一区二区三区四区 | 日日干日日操 | 精品视频一区二区 | 日本久久一区二区三区 | 久久成人一区 | 亚洲精品电影网在线观看 | 中文字幕视频免费 | 在线小视频 | 亚洲精品久久久久久国产精华液 | 精品国产第一区二区三区 | 日韩看片| 国产传媒毛片精品视频第一次 | 欧美一区二区三区在线播放 | 精品久久久久久久 | 91视频www.| 亚洲国产精品视频 | 亚洲免费一 | 国产精品一区二区av | 91久久久www播放日本观看 | 欧美一级欧美一级在线播放 | 伊人精品一区二区三区 | 国内精品视频在线观看 | 欧美一区二区三区视频在线观看 | 久久久久亚洲 | 国产精久久久久久久妇剪断 | 中文字幕 在线观看 | 亚洲国产成人精品久久久国产成人一区 | 中文字幕视频网 | 亚洲色欧美另类 | 久久精品国产一区二区 | 欧美一区二区三区在线看 | 国产四区 | 在线午夜 | 中文字幕一区二区视频 | 精品国产免费一区二区三区五区 | 超碰av人人 | 精品视频一二区 | 欧美一区二区三区 | 99视频网站|