R
Robert DeFazio
I have a very specific need to send a file to a web server using VB.NET
2005 or 2008 on a desktop platform. I could do this readily in ASP.NET,
but my need is a bit more specific, and I don't know how to accomplish
it. Let me explain what I need to know how to do.
When I set up an ASP.NET page so that it sends a file, it uses the file
control and the form's content type is set to "multipart/form-data."
When the submit button is clicked, ASP.NET handles the streaming of the
data to the receiving server automatically by spooling it out as fast as
the receiving server can accept it.
What I want to do is to regulate the streaming process so that I can (a)
set the size of the chunks of data being sent, (b)control the number of
chunks of data that are sent at any given point in time, and (c)be able
to pause the process at my discretion.
The metalogic of the process would be something like this:
1. Create the message header(s) that must appear at the outset of the
transmission.
2. Estgablish the size of the chunks of data to be sent.
3. Start sending the message.
4. When the time comes for the chunks of the file to be streamed,
prepare each chunk and send it.
5. Allow for some client-side capability to pause the transmission
process.
6. Complete the transmission.
7. Receive back any confirming message and parse it to determine if the
file was received correctly.
I am not looking for a complete solution, but rather some code that
identifies all the moving parts and shows sample code that illustrates
how to connect them. With that in hand, I believe that I can then
produce a working solution that will give me the ability to govern the
rate of the data being streamed to the recipient server and the ability
to pause the process at my discretion.
Any help will be greatly appreciated.
2005 or 2008 on a desktop platform. I could do this readily in ASP.NET,
but my need is a bit more specific, and I don't know how to accomplish
it. Let me explain what I need to know how to do.
When I set up an ASP.NET page so that it sends a file, it uses the file
control and the form's content type is set to "multipart/form-data."
When the submit button is clicked, ASP.NET handles the streaming of the
data to the receiving server automatically by spooling it out as fast as
the receiving server can accept it.
What I want to do is to regulate the streaming process so that I can (a)
set the size of the chunks of data being sent, (b)control the number of
chunks of data that are sent at any given point in time, and (c)be able
to pause the process at my discretion.
The metalogic of the process would be something like this:
1. Create the message header(s) that must appear at the outset of the
transmission.
2. Estgablish the size of the chunks of data to be sent.
3. Start sending the message.
4. When the time comes for the chunks of the file to be streamed,
prepare each chunk and send it.
5. Allow for some client-side capability to pause the transmission
process.
6. Complete the transmission.
7. Receive back any confirming message and parse it to determine if the
file was received correctly.
I am not looking for a complete solution, but rather some code that
identifies all the moving parts and shows sample code that illustrates
how to connect them. With that in hand, I believe that I can then
produce a working solution that will give me the ability to govern the
rate of the data being streamed to the recipient server and the ability
to pause the process at my discretion.
Any help will be greatly appreciated.