久久久久久久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原创视频| 国产精品一区二区在线 | 国产精品国产三级国产aⅴ无密码 | 国产乱码精品一区二区三区av | 亚洲午夜精品一区二区三区他趣 | 91在线看网站 | 亚洲第一在线 | 久久久成人精品 | 欧美综合国产精品久久丁香 | 欧美视频二区 | 荷兰欧美一级毛片 | 在线中文字幕亚洲 | 日韩三级在线 | 日韩电影在线一区 | 久久精品视频免费观看 | 日韩视频在线播放 | 毛片在线视频 | av入口| av影音在线 | 精品日韩在线 | 亚洲激情一区二区三区 | 欧美中文字幕在线观看 | 秋霞精品 | 色综合久久88色综合天天 | 久久久久国产 | 精品综合网 | 精品中文字幕视频 | 欧美亚洲一级 | 一级做a爰片性色毛片16美国 | 亚洲精品乱码久久久久久按摩观 |