wcf upload/download large files (i.e. Img, mp3) in chunks with windows service

丶灬走出姿态 提交于 2019-12-24 12:09:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!