wcf-streaming

Streaming with WCF and MTOM

陌路散爱 提交于 2019-12-30 03:24:06
问题 I am using WCF bindings with streamed transfer mode, for both uploading and downloading binary content to/from a service. I've managed to get it working. I'll include the configuration, contracts, etc for reference. I've made some tests to benchmark different bindings and encodings. Uploading results seems ok. NetTcp being the fastest, followed by BasicHttp-MTOM and then BasicHttp-Text. What suprises me is that, when downloading large files, MTOM is very slow as opposed to Text encoding with

Can Stream.CopyTo() method save the streams incomplete?

不羁岁月 提交于 2019-12-21 02:54:09
问题 I have a WCF service which allows me to upload files in chunks. What I am wondering is could this code can cause the uploaded stream to be only partially appended to the target stream in any case? I have my logs that shows me that all the sent streams are 512000 byte(which I set on client side) and I've sent 6 chunks out of 9 chunks so far. But on server the files size is 2634325. Which means the last chunk sent(6th) is saved incompletely. What can be causing this behaviour? What should I do

Can Stream.CopyTo() method save the streams incomplete?

不打扰是莪最后的温柔 提交于 2019-12-21 02:54:08
问题 I have a WCF service which allows me to upload files in chunks. What I am wondering is could this code can cause the uploaded stream to be only partially appended to the target stream in any case? I have my logs that shows me that all the sent streams are 512000 byte(which I set on client side) and I've sent 6 chunks out of 9 chunks so far. But on server the files size is 2634325. Which means the last chunk sent(6th) is saved incompletely. What can be causing this behaviour? What should I do

WCF, Streaming, Message Contract Error: Error in deserializing body of request message

安稳与你 提交于 2019-12-19 09:38:51
问题 I have developed a bit of a complicated WCF Service method. I would like to use the Streaming transfer mode, and because I have more than one parameter, I have defined a MessageContract with a body and a header. [MessageContract] public class ReportAudioMessage { [MessageHeader] public int ReportId; [MessageHeader] public string FileName; [MessageHeader] public int FileLengthInBytes; [MessageHeader] public int LengthInSeconds; [MessageBodyMember] public Stream ReportAudio; } Notice the stream

Streamed transfer restrictions with WCF

最后都变了- 提交于 2019-12-11 03:58:58
问题 According to the following guide at MSDN, any operations that use streamed transfers can only have one input/output parameter. Link: http://msdn.microsoft.com/en-us/library/ms731913.aspx (see heading "Restrictions on Streamed Transfers") I'm using streamed transfers for a WCF service that lets clients/consumers upload files to it. The upload itself works fine, but I need a way of passing two more input parameters along with the Stream object: 'string filename' and 'int userid'. How would I go

WCF Streaming File Transfer ON .NET 4

﹥>﹥吖頭↗ 提交于 2019-12-09 11:41:36
问题 I need a good example on WCF Streaming File Transfer. I have found several and tried them but the posts are old and I am wokding on .net 4 and IIS 7 so there are some problems. Can you gives me a good and up-to-date example on that. 回答1: The following answers detail using a few techniques for a posting binary data to a restful service. Post binary data to a RESTful application What is a good way to transfer binary data to a HTTP REST API service? Bad idea to transfer large payload using web

WCF Streaming File Transfer ON .NET 4

心不动则不痛 提交于 2019-12-03 13:45:50
I need a good example on WCF Streaming File Transfer. I have found several and tried them but the posts are old and I am wokding on .net 4 and IIS 7 so there are some problems. Can you gives me a good and up-to-date example on that. Kane The following answers detail using a few techniques for a posting binary data to a restful service. Post binary data to a RESTful application What is a good way to transfer binary data to a HTTP REST API service? Bad idea to transfer large payload using web services? The following code is a sample of how you could write a RESTful WCF service and is by no means

Can Stream.CopyTo() method save the streams incomplete?

送分小仙女□ 提交于 2019-12-03 08:51:41
I have a WCF service which allows me to upload files in chunks. What I am wondering is could this code can cause the uploaded stream to be only partially appended to the target stream in any case? I have my logs that shows me that all the sent streams are 512000 byte(which I set on client side) and I've sent 6 chunks out of 9 chunks so far. But on server the files size is 2634325. Which means the last chunk sent(6th) is saved incompletely. What can be causing this behaviour? What should I do to avoid this? Or is this completely safe, and I should look for the bug in somewhere else? public void

Streaming with WCF and MTOM

人走茶凉 提交于 2019-11-30 09:42:08
I am using WCF bindings with streamed transfer mode, for both uploading and downloading binary content to/from a service. I've managed to get it working. I'll include the configuration, contracts, etc for reference. I've made some tests to benchmark different bindings and encodings. Uploading results seems ok. NetTcp being the fastest, followed by BasicHttp-MTOM and then BasicHttp-Text. What suprises me is that, when downloading large files, MTOM is very slow as opposed to Text encoding with BasicHttp and Binary encoding with NetTcp. Am I missing something? Why BasicHttp-MTOM works way slower