urmm, hey guys.
im getting a 503 error on my program i'm making.
It's used to backup multiple files to a online ftp server.
and on the 5th file
it gets it on this line...
Stream requestStream = request.GetRequestStream();
heres my code (for the upload)...
public void upload(string pathtofile, string file)
{
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://ftp.example.com/" + file);
request.Method = WebRequestMethods.Ftp.UploadFile;
request.Credentials = new NetworkCredential("username", "password");
byte[] fileContents = File.ReadAllBytes(pathtofile + "\\" + file);
Stream requestStream = request.GetRequestStream();
requestStream.Write(fileContents, 0, fileContents.Length);
requestStream.Close();
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
response.Close();
}
and that's used with multiple commands like: upload("c:\\", "file.mdb")
is there any way of fixing this? thanks - maxicube