Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to solve FTP 550 error "access is deny" because bad connection while uploading
    primarykey
    data
    text
    <p>How to solve FTP 550 error "access is deny" because bad connection while uploading. I'm sure that my server already give permission because sometimes I can upload without problem. I'd read some post say that this happen because server had got slow connection but I want to know is there someone can solve this problem</p> <p>here is my code : </p> <pre><code>public bool FTPUploadFunct(string uploadto2, string newskinlocation2) { bool FTPUploadFunct = true; MethodInvoker methodInvokerDelegate = delegate() { toolStripStatusLabel1.Text = "Uploading...."; }; this.Invoke(methodInvokerDelegate); try { //delete old file FtpWebRequest requestFileDelete = (FtpWebRequest)WebRequest.Create(uploadto2); requestFileDelete.Credentials = new NetworkCredential("FTPUser20", "1234"); requestFileDelete.Method = WebRequestMethods.Ftp.DeleteFile; FtpWebResponse responseFileDelete = (FtpWebResponse)requestFileDelete.GetResponse(); //upload new file FtpWebRequest requestFTPUploader = (FtpWebRequest)WebRequest.Create(uploadto2); requestFTPUploader.Credentials = new NetworkCredential("FTPUser20", "1234"); requestFTPUploader.Method = WebRequestMethods.Ftp.UploadFile; FileInfo fileInfo = new FileInfo(newskinlocation2); FileStream fileStream = fileInfo.OpenRead(); int bufferLength = 2048; byte[] buffer = new byte[bufferLength]; Stream uploadStream = requestFTPUploader.GetRequestStream(); int contentLength = fileStream.Read(buffer, 0, bufferLength); while (contentLength != 0) { backgroundWorker1.ReportProgress((int)(contentLength / fileInfo.Length)); uploadStream.Write(buffer, 0, contentLength); contentLength = fileStream.Read(buffer, 0, bufferLength); } uploadStream.Close(); fileStream.Close(); backgroundWorker1.ReportProgress(100); requestFTPUploader = null; } catch (WebException ex) { FTPUploadFunct = false; String status = ((FtpWebResponse)ex.Response).StatusDescription; MessageBox.Show(status + "error while in FTPUploadFunc"); errorNumber = (int)((FtpWebResponse)ex.Response).StatusCode; if (errorNumber == 550) { MessageBox.Show("550" + "error while in FTPUploadFunc2"); }; } return FTPUploadFunct; } </code></pre> <p>for many time it stuck at</p> <pre><code>requestFileDelete.Method = WebRequestMethods.Ftp.DeleteFile; </code></pre> <p>but sometime at</p> <pre><code>requestFTPUploader.Method = WebRequestMethods.Ftp.UploadFile; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload