Hi,
i have problem of uploading zip file ot server from my windows mobile.. in server the .zip file is getting created,if i open file its telling unable to open and its corrupted
here is code
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uploadUrl);
req.Method = "PUT";
req.AllowWriteStreamBuffering = true;
// Retrieve request stream and wrap in StreamWriter
Stream reqStream = req.GetRequestStream();
StreamWriter wrtr = new StreamWriter(reqStream);
// Open the local file
StreamReader rdr = new StreamReader(localFile);
// loop through the local file reading each line
char[] buff = new char[1024];
int inLine = rdr.Read(buff, 0, 1024);
//int inLine = rdr.ReadBlock (buff,0,1024);
while (inLine > 0)
{
wrtr.WriteLine (buff);
inLine = rdr.Read (buff, 0, 1024);
}
rdr.Close();
wrtr.Close();
try
{
req.GetResponse();
}
catch
{
}
reqStream.Close();
Thanks