tags:

views:

32

answers:

1

Hi, 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-using-self-hosted-wcf-service/

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

Thanks, Totem

A: 

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

Shiraz Bhaiji
I dont understand your explenation since SecurityMode.None doesnt work. if you cannot sign the message (which i understand) why would trying to set no security fail, and set transport security work.
totem