I'd like this to be possible!
Can you write a web service (using C# and an asmx) that returns a ZIP file?
If so, can you give a simple example?
Thanks
I'd like this to be possible!
Can you write a web service (using C# and an asmx) that returns a ZIP file?
If so, can you give a simple example?
Thanks
Sure thing,
No matter if it's a ZIP, DOC, PDF. We call that MTOM in the SOAP world
This article shows how to return a file from webservice: http://articles.techrepublic.com.com/5100-10878_11-5805105.html.
I'm not sure you can use MTOM with vanilla .NET asmx services ( see here) . I know it's possible if using WCF though.
As a (poor) alternative, you could write a web method that returns the zipped data as a base64-encoded string (which would be probably quite long depending on the size of the file, so useful for small datasets only). Then you decode the string in the client to get the original data.