I think you should read a 1024 or 2048 etc number of bytes at a time consistently. Change the loop to keep reading 2048 (for example) bytes at a time until it reads all.
Main Topics
Browse All TopicsAny Experts Please Help!
I am using the following VB code in Window Mobile to download a 1M file from the web server. It works very fast on Wi-Fi mode, less than 5 seconds, using my code or Internet Explorer, no discernable different.
However, on GPRS/3G mode: it takes about 5 to 10 minutes to download the same file in IE, but my VB code took 17 or sometime 40 minutes to download the file. The first 500K seems fast in about 4 minutes, still a bit slow when compare to IE, but the last 500 was so slow. What am I missing? Please help. Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I was going to recommend the WebClient but of course that's not available. How many times have you compared the download times? You're obviously only using a GPRS connection as the speeds are between 27kBit/s & 14kBit/s which is low even for GPRS. It sounds like the connection is a bit flaky on GPRS.
Also, how about reading in blocks of 2k bytes at a time, or writing direct to a FileStream rather than memory. Not convinced it'll make a difference as it seems like a connection issue rather than lack of resources.
Business Accounts
Answer for Membership
by: TheLearnedOnePosted on 2009-05-06 at 07:38:09ID: 24315297
I have no idea, but you should be able to use a StreamReader to read all the bytes, without use a While statement. I am not sure if it will help your issue, but it might be a good place to start.