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

無法連接到 FTP:(553) 文件名不允許

Can#39;t connect to FTP: (553) File name not allowed(無法連接到 FTP:(553) 文件名不允許)
本文介紹了無法連接到 FTP:(553) 文件名不允許的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我需要 FTP 文件到目錄.在 .Net 中,我必須使用目標文件夾上的文件來創建連接,因此我使用 FTP 手動將 Blank.dat 放在服務器上.我檢查了訪問(ls -l),它是-rw-r--r--.但是當我嘗試連接到 FTP 文件夾時,我得到:遠程服務器返回錯誤:(553)文件名不允許"從服務器返回.我所做的研究表明,這可能源于權限問題,但正如我所說,我有權查看文件并可以從文件夾運行 ls .還有哪些其他原因可能導致此問題,有沒有辦法連接到文件夾而無需指定文件?

I need to FTP a file to a directory. In .Net I have to use a file on the destination folder to create a connection so I manually put Blank.dat on the server using FTP. I checked the access (ls -l) and it is -rw-r--r--. But when I attempt to connect to the FTP folder I get: "The remote server returned an error: (553) File name not allowed" back from the server. The research I have done says that this may arrise from a permissions issue but as I have said I have permissions to view the file and can run ls from the folder. What other reasons could cause this issue and is there a way to connect to the folder without having to specify a file?

            byte[] buffer;
            Stream reqStream;
            FileStream stream;
            FtpWebResponse response;
            FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(new Uri(string.Format("ftp://{0}/{1}", SRV, DIR)));
            request.Method = WebRequestMethods.Ftp.UploadFile;
            request.Credentials = new NetworkCredential(UID, PASS);
            request.UseBinary = true;
            request.Timeout = 60000 * 2;
            for (int fl = 0; fl < files.Length; fl++)
            {
                request.KeepAlive = (files.Length != fl);
                stream = File.OpenRead(Path.Combine(dir, files[fl]));
                reqStream = request.GetRequestStream();
                buffer = new byte[4096 * 2];
                int nRead = 0;
                while ((nRead = stream.Read(buffer, 0, buffer.Length)) != 0)
                {
                    reqStream.Write(buffer, 0, nRead);
                }
                stream.Close();
                reqStream.Close();

                response = (FtpWebResponse)request.GetResponse();
                response.Close();
            }

推薦答案

雖然回復一個舊帖子只是認為它可能對某人有所幫助.

Although replying to an old post just thought it might help someone.

當你創建你的 ftp url 時,確保你沒有包含該登錄的默認目錄.

When you create your ftp url make sure you are not including the default directory for that login.

例如,這是我指定的路徑,我得到了異常 553 FileName not allowed exception

for example this was the path which I was specifying and i was getting the exception 553 FileName not allowed exception

ftp://myftpip/gold/central_p2/inbound/article_list/jobs/abc.txt

我使用的登錄名具有默認目錄 gold/central_p2.so 提供的 url 變得無效,因為它試圖在默認目錄中找到整個路徑.我相應地修改了我的 url 字符串并且能夠擺脫例外.

The login which i used had the default directory gold/central_p2.so the supplied url became invalid as it was trying to locate the whole path in the default directory.I amended my url string accordingly and was able to get rid of the exception.

我修改后的網址看起來像

my amended url looked like

ftp://myftpip/inbound/article_list/jobs/abc.txt

謝謝,

薩布

這篇關于無法連接到 FTP:(553) 文件名不允許的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 超時)
主站蜘蛛池模板: 99久久精品免费看国产四区 | 在线综合视频 | 一区二区三区在线播放 | 欧美久久免费观看 | 国产精品久久久久久久 | 91在线一区 | 国产免费观看一级国产 | 一区二区三区四区不卡 | 国产精品theporn| 免费在线看黄 | 爱高潮www亚洲精品 中文字幕免费视频 | 亚洲一区免费 | 婷婷色在线播放 | 久草网址 | 91人人爽| 成人看片在线观看 | www.99热.com | 亚洲精品1区| 在线观看视频h | 久草a√ | 国产日韩精品久久 | 欧美精品成人一区二区三区四区 | 亚洲精品黄色 | 精品乱码一区二区三四区 | 国产精品成人在线观看 | 成人片网址| 日韩精品一区二区三区在线播放 | 久久国产电影 | 欧美aaaaaaaaaa | 综合久久国产 | 91精品国产综合久久久久久 | 黑人性hd | 日韩高清一区二区 | 日韩精品免费在线观看 | 国产成人综合一区二区三区 | 99亚洲精品 | 欧美久久国产精品 | 国产精品久久久 | 免费看a | 亚洲精品乱码 | 国产精品视频一区二区三区四区国 |