简体   繁体   English

NetTcpBinding()与TransferMode.Streamed

[英]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: 尝试通过不具有安全性并且像这样流式传输的代码使用净TCP端点时遇到超时异常:

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. 如果我只是不选择SecurityMode.None或选择SecurityMode.Transport,则相同的代码将起作用,例外是超时时间太短,我累加了接收,发送,打开,关闭和设置所有超时的所有超时时间马克斯,那没有用。

im using sample code from: http://csharp-codesamples.com/2009/02/data-transfer-using-self-hosted-wcf-service/ 即时通讯使用的示例代码来自: http : //csharp-codesamples.com/2009/02/data-transfer-using-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. 有时WCF给出错误的错误消息。

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 http://msdn.microsoft.com/en-us/library/ms731316.aspx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF:通过netTcpBinding通过TransferMode = Streamed将文件传输到服务器时,对客户端的响应延迟 - WCF: response to client delayed when transferring file to server with TransferMode=Streamed over netTcpBinding TransferMode = Streamed时发生TimeoutException - TimeoutException when TransferMode=Streamed WCF HttpTransport:流式传输与缓冲的TransferMode - WCF HttpTransport: streamed vs buffered TransferMode TransferMode = Streamed时耗尽连接 - Running out of connections when TransferMode = Streamed 使用basichttpBinding和流的transfermode的WCF中出现错误请求 - error Bad Request in WCF using basichttpBinding with transfermode of streamed WCF,NetTcpBinding,流传输模式可以是双工吗? - WCF, NetTcpBinding, Streamed transfer mode can be duplex? WCF NetTcpBinding缓冲与流式处理性能问题 - WCF NetTcpBinding Buffered vs Streamed performance problems 如何将自定义对象序列化为流(WCF HttpBinding-TransferMode =流式) - How to seralize custom objects into stream (WCF HttpBinding - TransferMode = Streamed) 从wcf绑定transferMode从“Buffered”更改为“Streamed”是否被认为是客户端的重大变化? - Is changing from wcf binding transferMode from “Buffered” to “Streamed” considered a breaking change for the client? 具有TransferMode = Streamed的WCF REST客户端-记录整个(“原始”)http请求/响应 - WCF REST client with TransferMode=Streamed - logging entire (“raw”) http requests/responses
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM