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
|