|
|
|
Upload FTP file จาก Mobile 5.0 ไปยัง Server (ใช้ vs2005 framework 2.0) |
|
|
|
|
|
|
|
จะ Upload ผ่านอะไรครับ Lan Adapter หรือเผ่านระบบ Internet ครับ
|
|
|
|
|
Date :
2011-07-07 11:36:54 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internet ครับ
|
|
|
|
|
Date :
2011-07-07 14:36:53 |
By :
tee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (C#)
using OpenNETCF.Net.Ftp;
using System.Net;
private static FtpWebRequest request;
private static Stream ftpRequestStream;
private static void Connect()
{
FtpRequestCreator creator = new FtpRequestCreator();
WebRequest.RegisterPrefix("ftp:", creator);
// Building our URI object
Uri testUri;
if ("192.168.1.9:2121".IndexOf("ftp:") != 0)
testUri = new Uri("ftp://" + "192.168.1.9:21");
else
testUri = new Uri("192.168.1.9:21");
// Creating a new FtbRequest object
request = (FtpWebRequest)WebRequest.Create(testUri);
request.Credentials = new NetworkCredential("login", "password");
// Getting the Request stream
ftpRequestStream = request.GetRequestStream();
StreamReader reader = new StreamReader(ftpRequestStream);
...
...
}
http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/941951d8-5f3c-46c5-bc9f-b6d8e3fac5fa
เผื่อจะมีประโยชน์ครับ ถ้าเขียนได้รบกวนโพสไว้ก็ดีครับ
|
|
|
|
|
Date :
2011-07-07 14:40:11 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|