C#nedir?com Homepage
Forum Home Forum Home > C/C++ > C / C++ ve C++.NET
  New Posts New Posts RSS Feed - C# Upload proxy hatası
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

C# Upload proxy hatası

 Post Reply Post Reply
   

Author
Message
topcular View Drop Down
Newbie
Newbie


Joined: 16 Kasım 2013
Location: Turkey
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote topcular Quote  Post ReplyReply Direct Link To This Post Topic: C# Upload proxy hatası
    Posted: 14 Ocak 2014 at 11:50
Merhabalar, aşağıda ki gibi ftp ye upload yapmaya çalışıyorum fakat.

İstenen FTP komutu HTTP proxy kullanılırken desteklenmiyor hatası veriyor. Yardımlarınız için teşekkürler.



FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://alanadi.com.tr/TEST/");
            request.Method = WebRequestMethods.Ftp.UploadFile;

            request.Credentials = new NetworkCredential("kullaniciadi", "parola");

            StreamReader sourceStream = new StreamReader("D:\\dosya.xls");
            byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
            sourceStream.Close();
            request.ContentLength = fileContents.Length;

            Stream requestStream = request.GetRequestStream();
            requestStream.Write(fileContents, 0, fileContents.Length);
            requestStream.Close();

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

            Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription);

            response.Close();

Back to Top
 Post Reply Post Reply
  Share Topic   
   


Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.