PC Review


Reply
Thread Tools Rate Thread

Downloading HTTP response from website using Windows CE 5.0 Compact framework

 
 
Prashant Bhure
Guest
Posts: n/a
 
      26th Sep 2008
Hi,
Dim objWebStream As Stream = Nothing
Dim objWebResponse As HttpWebResponse
Dim objFileStream As FileStream = Nothing

Dim buffer(4095) As Byte
objWebResponse = CType(objUploadRequest.GetResponse,
HttpWebResponse)
objWebStream = objWebResponse.GetResponseStream
objFileStream = New FileStream(filename, FileMode.Create)

intBytesRead = 0
intBytesRead = objWebStream.Read(buffer, 0, buffer.Length)

While intBytesRead > 0
objFileStream.Write(buffer, 0, intBytesRead)
objFileStream.Flush()
intBytesRead = objWebStream.Read(buffer, 0, buffer.Length)
End While


objWebResponse.Close()
objFileStream.Close()

The above code is a snippet of the code which I am using for downloading a
file from server afer sending a request.
I am using .net compact framework and the application it to be run on
Dolphin with OS Windows CE 5.0
The problem is after getting the response from the server it takes alomst 15
Minutes to come out of the while loop.
The size of the file downloaded is 1.1Mb. I tried a lot to increase the
download speed but cant.
Can any body help me in increasing the speed.

Thanks in advance.

PrashantB


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading an Image within the Compact Framework in C# Greg Microsoft C# .NET 3 11th Nov 2007 07:10 PM
Fix available for MSMQ Http Transport in Compact Framework 2.0? =?Utf-8?B?Qm9iIEhhbnNvbg==?= Microsoft Dot NET Compact Framework 0 20th Oct 2006 08:36 PM
HTTP SSL Request on Compact Framework 1.1 rpatel4@gmail.com Microsoft Dot NET Compact Framework 3 6th Sep 2006 05:38 PM
HTTP\SOAP Compression and Compact Framework bike_mike Microsoft Dot NET Compact Framework 1 19th Jan 2004 02:57 PM
HTTP\SOAP Compression and Compact Framework bike_mike Microsoft Dot NET Compact Framework 1 17th Jan 2004 08:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:19 AM.