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

      <tfoot id='FnaVv'></tfoot>

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

    2. <small id='FnaVv'></small><noframes id='FnaVv'>

    3. <legend id='FnaVv'><style id='FnaVv'><dir id='FnaVv'><q id='FnaVv'></q></dir></style></legend>

        使用 C# 到 FTP 文件到大型機,包括數(shù)據(jù)集 - 將

        Use C# to FTP file to mainframe including dataset - Translate FTP script to FtpWebRequest code(使用 C# 到 FTP 文件到大型機,包括數(shù)據(jù)集 - 將 FTP 腳本翻譯成 FtpWebRequest 代碼)
        <legend id='WieHp'><style id='WieHp'><dir id='WieHp'><q id='WieHp'></q></dir></style></legend>
          <bdo id='WieHp'></bdo><ul id='WieHp'></ul>
        • <i id='WieHp'><tr id='WieHp'><dt id='WieHp'><q id='WieHp'><span id='WieHp'><b id='WieHp'><form id='WieHp'><ins id='WieHp'></ins><ul id='WieHp'></ul><sub id='WieHp'></sub></form><legend id='WieHp'></legend><bdo id='WieHp'><pre id='WieHp'><center id='WieHp'></center></pre></bdo></b><th id='WieHp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WieHp'><tfoot id='WieHp'></tfoot><dl id='WieHp'><fieldset id='WieHp'></fieldset></dl></div>
            <tbody id='WieHp'></tbody>
        • <tfoot id='WieHp'></tfoot>

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

                • 本文介紹了使用 C# 到 FTP 文件到大型機,包括數(shù)據(jù)集 - 將 FTP 腳本翻譯成 FtpWebRequest 代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我使用 cmd (Windows) 將文件發(fā)送到 IBM 大型機并且工作正常,如下所示:

                  I use a cmd (Windows) to send file to an IBM Mainframe and works fine it's something like this:

                  Open abc.wyx.state.aa.bb
                  User
                  Pass
                  lcd c:Transfer>
                  Put examplefile 'ABCD.AA.C58FC.ABC1FD.ZP3ABC'
                  close
                  bye
                  

                  我需要將其轉(zhuǎn)換為 C#.我一直在嘗試使用 FtpWebRequest 但沒有運氣.我不知道如何包含我猜的數(shù)據(jù)集.當(dāng)我運行應(yīng)用程序時,出現(xiàn)以下錯誤:

                  I need to convert this to C#. I have been trying using FtpWebRequest but no luck. I cannot figure out how include the dataset I guess. When I run the application I got the following error:

                  ((System.Exception)(ex)).Message "遠(yuǎn)程服務(wù)器返回錯誤:(550) 文件不可用(例如,找不到文件,無法訪問)."550 無法存儲遠(yuǎn)程服務(wù)器返回錯誤:(550) 文件不可用(例如,找不到文件,無法訪問).

                  ((System.Exception)(ex)).Message "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)." 550 Unable to store The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

                  ((FtpWebResponse)ex.Response).StatusDescription "550 無法存儲/'ABCD.AA.C58FC.ABC1FD.ZP3ABC/examplefile' "

                  ((FtpWebResponse)ex.Response).StatusDescription "550 Unable to store /'ABCD.AA.C58FC.ABC1FD.ZP3ABC/examplefile' "

                  這是我在 C# 中得到的內(nèi)容

                  Here is what I got in C#

                  string user = "user";
                  string pwd = "password";
                  
                  string ftpfullpath = @"ftp://abc.wyx.state.aa.bb//'ABCD.AA.C58FC.ABC1FD.ZP3ABC'/examplefile'";
                  
                  try
                  {
                       FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
                       ftp.Credentials = new NetworkCredential(user, pwd);
                  
                       ftp.KeepAlive = true;
                       ftp.UseBinary = false;  //Use ascii.              
                  
                       ftp.Method = WebRequestMethods.Ftp.UploadFile;
                  
                       FileStream fs = File.OpenRead(inputfilepath);
                       byte[] buffer = new byte[fs.Length];
                       fs.Read(buffer, 0, buffer.Length);
                       fs.Close();
                  
                       Stream ftpstream = ftp.GetRequestStream();
                       ftpstream.Write(buffer, 0, buffer.Length);
                       ftpstream.Close();
                  }
                  catch (WebException ex)
                  {
                       String status = ((FtpWebResponse)ex.Response).StatusDescription;
                       throw new Exception(status);
                  }
                  

                  推薦答案

                  您沒有指定運行 ftp 腳本的平臺.我假設(shè)是 Windows.

                  You didn't specify what platform you run the ftp script at. I assume Windows.

                  當(dāng)你使用 Windows ftp 命令 put 比如:

                  When you use Windows ftp command put like:

                  put localpath remotepath
                  

                  它會在 FTP 服務(wù)器上進行以下調(diào)用:

                  it results in following call on the FTP server:

                  STOR remotefile
                  

                  類似地,如果您將 FtpWebRequest 與類似的 URL 一起使用

                  Similarly if you use FtpWebRequest with an URL like

                  ftp://example.com/remotepath
                  

                  在 FTP 服務(wù)器上導(dǎo)致以下(相同)調(diào)用:

                  is results in following (same) call on the FTP server:

                  STORE remotepath
                  

                  請注意,主機名 (example.com) 之后的第一個斜杠被省略.

                  Note that the first slash after hostname (example.com) is omitted.

                  這意味著您的 ftp 腳本命令:

                  This means that your ftp script commands:

                  Open abc.wyx.state.aa.bb
                  ...
                  Put examplefile 'ABCD.AA.C5879.ABC123.123ABC'
                  

                  翻譯成FtpWebRequest URL,如:

                  string ftpfullpath = @"ftp://abc.wyx.state.aa.bb/'ABCD.AA.C5879.ABC123.123ABC'";
                  

                  這兩個結(jié)果都會在 FTP 服務(wù)器上調(diào)用:

                  Both result in this call on the FTP server:

                  STOR 'ABCD.AA.C5879.ABC123.123ABC'
                  

                  <小時>

                  相反,您的 ftp 代碼與

                  string ftpfullpath = @"ftp://abc.wyx.state.aa.bb//'ABCD.AA.C5879.ABC123.123ABC'/examplefile'";
                  

                  結(jié)果:

                  STOR /'ABCD.AA.C5879.ABC123.123ABC'/examplefile'
                  

                  它看起來不適合大型機.

                  It does not look correct for mainframe.

                  我的 C# 代碼的會話記錄:

                  Transcript of a session by my C# code:

                  USER user
                  331 Password required for user
                  PASS password
                  230 Logged on
                  OPTS utf8 on
                  200 UTF8 mode enabled
                  PWD
                  257 "/" is current directory.
                  TYPE A
                  200 Type set to A
                  PASV
                  227 Entering Passive Mode (zzz,zzz,zzz,zzz,193,162)
                  STOR 'ABCD.AA.C5879.ABC123.123ABC'
                  150 Connection accepted
                  226 Transfer OK
                  

                  我的 ftp 腳本的會話記錄:

                  Transcript of the session by my ftp script:

                  USER user
                  331 Password required for user
                  PASS password
                  230 Logged on
                  PORT zzz,zzz,zzz,zzz,193,186
                  200 Port command successful
                  STOR 'ABCD.AA.C5879.ABC123.123ABC'
                  150 Opening data channel for file transfer.
                  226 Transfer OK
                  QUIT
                  221 Goodbye
                  

                  我已經(jīng)針對 FileZilla FTP 服務(wù)器對此進行了測試,因此顯然 FTP 服務(wù)器的響應(yīng)在大型機 FTP 上會有所不同.但是客戶端的FTP命令應(yīng)該是一樣的.

                  I've tested this against FileZilla FTP server, so obviously the FTP server responses will differ on the mainframe FTP. But the FTP commands from the client should be the same.

                  這篇關(guān)于使用 C# 到 FTP 文件到大型機,包括數(shù)據(jù)集 - 將 FTP 腳本翻譯成 FtpWebRequest 代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                • <i id='Fmkvh'><tr id='Fmkvh'><dt id='Fmkvh'><q id='Fmkvh'><span id='Fmkvh'><b id='Fmkvh'><form id='Fmkvh'><ins id='Fmkvh'></ins><ul id='Fmkvh'></ul><sub id='Fmkvh'></sub></form><legend id='Fmkvh'></legend><bdo id='Fmkvh'><pre id='Fmkvh'><center id='Fmkvh'></center></pre></bdo></b><th id='Fmkvh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Fmkvh'><tfoot id='Fmkvh'></tfoot><dl id='Fmkvh'><fieldset id='Fmkvh'></fieldset></dl></div>
                  <tfoot id='Fmkvh'></tfoot>
                    <tbody id='Fmkvh'></tbody>
                      <bdo id='Fmkvh'></bdo><ul id='Fmkvh'></ul>

                      • <legend id='Fmkvh'><style id='Fmkvh'><dir id='Fmkvh'><q id='Fmkvh'></q></dir></style></legend>

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

                            主站蜘蛛池模板: 精品伊人| 国产免费视频在线 | 中文字幕在线第二页 | 日韩a| 欧美一级视频免费看 | 成人av片在线观看 | 天堂一区| 黄网免费 | 欧美色图另类 | 久久免费观看视频 | 精品一区二区在线视频 | 四虎影院新地址 | 国产一区二区不卡 | 国产精品综合色区在线观看 | 91精品国产高清一区二区三区 | 精品久久久久久久久久久久久久 | 美女黄视频网站 | 欧美国产精品一区二区三区 | 精品久久国产老人久久综合 | 国产精品中文字幕在线 | 欧美激情精品久久久久 | 国产 欧美 日韩 一区 | 激情五月婷婷综合 | 天天拍天天操 | 欧美日韩福利视频 | 欧美日韩在线看 | 午夜视频在线视频 | 99精品热视频 | 国产精品女人久久久 | 男女网站免费 | 国产99免费 | 国产高清免费 | 欧美激情精品久久久久久变态 | 色悠悠久 | 看片一区 | 视频一区在线 | 波多野结衣一二三区 | 成人免费一区二区三区视频网站 | 久久精品二区 | 国产精品一区二区久久 | 欧美aⅴ|