开发者

NetTcpBinding() with TransferMode.Streamed

I am getting a timeout exception when trying to use a net tcp endpoint through code that has no security and is streamed like so:

NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
binding.TransferMode = TransferMode.Streamed;
binding.SendTimeout = TimeSpan.MaxValue;

the same code would work if i just leave out the SecurityMode.None or choose SecurityMode.Transport, the exception is on a timeout that is too low, i tired adding all the timeouts for recive, send, open, close and set them all to Max and that didnt work.

im using sample code from: http://csharp-codesamples.com/2009/02/data-transfer-usi开发者_JAVA技巧ng-self-hosted-wcf-service/

Any explenation as to how to use no security in this scenario would be appriciated.

Thanks, Totem


Sometimes WCF gives the wrong error message.

Only some security modes work when you are using streaming. You cannot sign a message, when you do not know how long it is.

Transport security mode works and is default, therefore it works when you do not specify the transport mode.

http://msdn.microsoft.com/en-us/library/ms731316.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜