问题
I have a window service and i want it to be able to upload/download large (around 4MB) files (Img, music etc.) in chunks.
I tried to do that by changing the 'maxBufferSize' 'maxRecivedMessageSize' etc. in both the service and client app.config files, but unfortunately it didn't work.
My question is how I can upload/download files in chunks. and if I can do that just with the App.config file?
Thank!
回答1:
WCF doesn't have direct support for chunking (it always sends whole data as single chunk) but you can check this extensibility example to get chunking channel. Both your service and client must use that channel to make it work.
来源:https://stackoverflow.com/questions/6723976/wcf-upload-download-large-files-i-e-img-mp3-in-chunks-with-windows-service