Last post Jan 19, 2011 02:38 PM by nighthawk69
Jan 18, 2011 04:32 PM|nighthawk69|LINK
I have a web service I put together that has a custom soap header for the authorization (UserName and Password). I have a function currently that will allow a user to download a file from my site via a web service. I have integrated this download to the
membership system of the site.
They are using a vb.net front end client to perform the download. The files I download are around a meg in size. I would like to show the download progess of the file. I was going to setup MTOM and download the file in chunks. I am trying to get around
the authorization of each "chunk" of data that I am sending down to the client. I do not want to hit my authorization process for all of these calls to the web service with the file offset.
The authorization header works well for other functions I have put together for this web service. They set a username and password and then call a function for specific data that I am making available via the web service. Is there an easier method to stream
a file to a user and show the download progress of the file? I was going to generate a token and have that token passed per chunk, but I still have to go through my security process. Can anyone assist in the proper design of a webservice to stream a file
with progress and passing credientials.
Thanks for the support
asp .NET 2.0
Jan 19, 2011 09:44 AM|atconway|LINK
Is there an easier method to stream a file to a user and show the download progress of the file?
Yes. But the 1st step is a big one; I have created webservices that uses MTOM to send the data in chunks and it is a viable method, but webservices are the technology choice of the past. You really need to migrate that service over to WCF. It will be a bit
of a struggle to get streaming support help for old .asmx web services. You can still use MTOM in WCF if you wish, but streaming large (or small) amounts of data in WCF is MUCH better than it was with .asmx services. Plus WSE 3.0 which offered the support
for MTOM is definently obsolete and no further improvements will be made.
If you can migrate your service to WCF, doing things like updating the progress of the stream is much easier (especially if you were to ever use a technology like Silverlight but thats a different story). Take a look at the following links to see how WCF
Large Data and Streaming:
How to: Enable Streaming:
Streaming Message Transfer:
Progress Indication while Uploading/Downloading Files using WCF:
If you are really stuck with using a .asmx service you will have a difficult time, but maybe something like this will help:
Sending files in chunks with MTOM Web Services and .NET 2.0:
Lastly, you could also try support from the .asmx forum located here:
Hope this helps!
Jan 19, 2011 02:38 PM|nighthawk69|LINK
Thank you very much for your detailed post.
I looks like I have some additional research before I make a decision on how to proceed.
Thanks again for the followup of information.