C
Charles A. Lackman
Hello,
I am working on an updater that Retrieves a file from a web page.
GetRequest.Method = "POST"
SW = New StreamWriter(TheRequest.GetRequestStream)
SW.WriteLine(TransferName)
SW.Close()
TheResponse = TheRequest.GetResponse()
ms = New MemoryStream()
CopyData(TheResponse.GetResponseStream(), ms)
ms.Seek(0, SeekOrigin.Begin)
System.IO.Directory.CreateDirectory(TransferFolder)
Dim st As FileStream = New FileStream(CompleteName, FileMode.Create)
ms.WriteTo(st)
st.Close()
ms.Close()
The application works good about 90% of the time I have noticed that when
the file is really big like 25 Megs, it stops sending at about 16 Megs. Is
this because the computer does not have enough memory to store the complete
file? or could it be something with the web page that is responding to the
request? or could it be something else.
Any suggestions will be greatly appreciated and even modifications to my
code above. I am not sure how to make the memory stream write to the file
every Meg to test the theory.
Thanks,
Chuck
I am working on an updater that Retrieves a file from a web page.
GetRequest.Method = "POST"
SW = New StreamWriter(TheRequest.GetRequestStream)
SW.WriteLine(TransferName)
SW.Close()
TheResponse = TheRequest.GetResponse()
ms = New MemoryStream()
CopyData(TheResponse.GetResponseStream(), ms)
ms.Seek(0, SeekOrigin.Begin)
System.IO.Directory.CreateDirectory(TransferFolder)
Dim st As FileStream = New FileStream(CompleteName, FileMode.Create)
ms.WriteTo(st)
st.Close()
ms.Close()
The application works good about 90% of the time I have noticed that when
the file is really big like 25 Megs, it stops sending at about 16 Megs. Is
this because the computer does not have enough memory to store the complete
file? or could it be something with the web page that is responding to the
request? or could it be something else.
Any suggestions will be greatly appreciated and even modifications to my
code above. I am not sure how to make the memory stream write to the file
every Meg to test the theory.
Thanks,
Chuck