Applicatins are built by using C#. one of the tasks is transfer a image file from server to client via web service (SOAP). in the client side, the image file will be saved to disk, no web page.
one of my co-workers told us, the data transferred between server and client must be under 8k, so we need to cut our image file, which is 2M, into smaller pieces.
is that true?
Right now the data can be transferred between client and server. The size is right but the content is not because the displ开发者_高级运维ay is not the same when we open the received file. My co-workers tried different encoding but none works.
which encoding we should use? UTF8?
You could to open that image file as a byte[] and to transfer it. This way you shouldn't have any encoding problem. This article can provide more information: Large Data and Streaming
You can change default limit for WCF request/response message size by setting MaxReceivedMessageSize
property in configuration.
And it's reasonable to transfer image as a binary object, not string.
You will probably also have to adjust other limit settings, like max array size, max string size, etc.
精彩评论