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

    <bdo id='gptil'></bdo><ul id='gptil'></ul>
  • <legend id='gptil'><style id='gptil'><dir id='gptil'><q id='gptil'></q></dir></style></legend>
  • <tfoot id='gptil'></tfoot>

    <small id='gptil'></small><noframes id='gptil'>

    1. <i id='gptil'><tr id='gptil'><dt id='gptil'><q id='gptil'><span id='gptil'><b id='gptil'><form id='gptil'><ins id='gptil'></ins><ul id='gptil'></ul><sub id='gptil'></sub></form><legend id='gptil'></legend><bdo id='gptil'><pre id='gptil'><center id='gptil'></center></pre></bdo></b><th id='gptil'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gptil'><tfoot id='gptil'></tfoot><dl id='gptil'><fieldset id='gptil'></fieldset></dl></div>

        如何使用 FtpWebRequest 正確斷開與 FTP 服務(wù)器的連接

        How to properly disconnect from FTP server with FtpWebRequest(如何使用 FtpWebRequest 正確斷開與 FTP 服務(wù)器的連接)

          • <legend id='fKXy5'><style id='fKXy5'><dir id='fKXy5'><q id='fKXy5'></q></dir></style></legend>
              <tbody id='fKXy5'></tbody>
          • <small id='fKXy5'></small><noframes id='fKXy5'>

                <bdo id='fKXy5'></bdo><ul id='fKXy5'></ul>
                  <tfoot id='fKXy5'></tfoot>
                  <i id='fKXy5'><tr id='fKXy5'><dt id='fKXy5'><q id='fKXy5'><span id='fKXy5'><b id='fKXy5'><form id='fKXy5'><ins id='fKXy5'></ins><ul id='fKXy5'></ul><sub id='fKXy5'></sub></form><legend id='fKXy5'></legend><bdo id='fKXy5'><pre id='fKXy5'><center id='fKXy5'></center></pre></bdo></b><th id='fKXy5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fKXy5'><tfoot id='fKXy5'></tfoot><dl id='fKXy5'><fieldset id='fKXy5'></fieldset></dl></div>
                1. 本文介紹了如何使用 FtpWebRequest 正確斷開與 FTP 服務(wù)器的連接的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我創(chuàng)建了一個 ftp 客戶端,它在一天中連接數(shù)次以從 FTP 服務(wù)器檢索日志文件.

                  I've created a ftp client that connects several times during the day to retrieve log files from a FTP server.

                  問題是幾個小時后,我從 FTP 服務(wù)器收到一條錯誤消息(已達到 -421 會話限制..).當我使用 netstat 檢查連接時,我可以看到到服務(wù)器的多個已建立"連接,即使我已經(jīng)關(guān)閉"了連接.

                  The Problem is that after a few hours I am getting an error message from the FTP server (-421 session limit reached..). When I check the connections with netstat, I can see several 'ESTABLISHED' connections to the server even though I've "closed" the connection.

                  當我嘗試通過命令行或 FileZilla 執(zhí)行相同操作時,連接已正確關(guān)閉.

                  When I try to do the same over the command line or FileZilla, the connections are properly closed.

                  ftpRequest = (FtpWebRequest)FtpWebRequest.Create(host + "/" + remoteFile);
                  ftpRequest.Credentials = new NetworkCredential(user, pass);
                  ftpRequest.UseBinary = true;
                  ftpRequest.UsePassive = true;
                  ftpRequest.KeepAlive = true;
                  ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile;
                  ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
                  ftpStream = ftpResponse.GetResponseStream();
                  FileStream localFileStream = new FileStream(localFile, FileMode.Create);
                  int bytesRead = ftpStream.Read(byteBuffer, 0, bufferSize);
                  /* Resource Cleanup */
                  
                  localFileStream.Close();
                  ftpStream.Close();
                  ftpResponse.Close();
                  ftpRequest = null;
                  

                  如何正確關(guān)閉/斷開連接?我是不是忘了什么?

                  How can I close/disconnect the connection properly? Did I forget anything?

                  推薦答案

                  嘗試設(shè)置 FtpWebRequest.KeepAlive 屬性為 false.如果 KeepAlive 設(shè)置為 false,則在請求完成時將關(guān)閉與服務(wù)器的控制連接.

                  Try and set the FtpWebRequest.KeepAlive property to false. If KeepAlive is set to false, then the control connection to the server will be closed when the request completes.

                  ftpWebRequest.KeepAlive = false;
                  

                  這篇關(guān)于如何使用 FtpWebRequest 正確斷開與 FTP 服務(wù)器的連接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                  1. <tfoot id='Jssre'></tfoot>

                        <tbody id='Jssre'></tbody>

                    1. <small id='Jssre'></small><noframes id='Jssre'>

                        <bdo id='Jssre'></bdo><ul id='Jssre'></ul>
                        <legend id='Jssre'><style id='Jssre'><dir id='Jssre'><q id='Jssre'></q></dir></style></legend>

                          • <i id='Jssre'><tr id='Jssre'><dt id='Jssre'><q id='Jssre'><span id='Jssre'><b id='Jssre'><form id='Jssre'><ins id='Jssre'></ins><ul id='Jssre'></ul><sub id='Jssre'></sub></form><legend id='Jssre'></legend><bdo id='Jssre'><pre id='Jssre'><center id='Jssre'></center></pre></bdo></b><th id='Jssre'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Jssre'><tfoot id='Jssre'></tfoot><dl id='Jssre'><fieldset id='Jssre'></fieldset></dl></div>
                            主站蜘蛛池模板: 精品日韩一区 | 国内av在线 | 国产亚洲精品精品国产亚洲综合 | 欧美亚洲视频在线观看 | 天天干狠狠操 | 欧美一区二区免费 | 久久久人成影片一区二区三区 | 91国产视频在线观看 | 尤物在线精品视频 | 韩日在线 | 亚洲高清视频在线观看 | 亚洲午夜精品 | 一区二区精品电影 | 亚洲综合色 | 全免费a级毛片免费看视频免费下 | 免费观看av| 午夜精品久久久久久久99黑人 | 久久久久久久国产精品视频 | 国产高清美女一级a毛片久久w | 国产夜恋视频在线观看 | 国产欧美精品在线观看 | 亚洲欧美中文日韩在线v日本 | 九九免费观看视频 | 色一级 | 国产超碰人人爽人人做人人爱 | 精品自拍视频在线观看 | 久久精品二区 | 美国av毛片 | 在线免费黄色小视频 | 亚洲在线视频 | 日本欧美在线 | 69av片| 中文字幕人成人 | 免费的av网站| 国产成人99久久亚洲综合精品 | 国产精品成人一区二区三区夜夜夜 | 精品欧美一区二区三区免费观看 | 免费看的黄网站 | 中文字幕第二区 | 国内精品久久久久久影视8 最新黄色在线观看 | 日美女逼逼 |