[Mono-list] NetTcpBinding with SecurityMode.Transport

Patrick Rocke patrick.rocke at gmail.com
Tue Jul 3 14:56:28 UTC 2012


Hi,

I have a simple WCF client/server implementation using NetTcp duplex
channels. If I create the binding with SecurityMode.None then I can
successfully call from the client to the server and handle the callbacks.

However, as soon as I change it to SecurityMode.Transport (NetTcpBinding
binding = new NetTcpBinding(SecurityMode.Transport, false);) I start to get
the following error when making the call to the server:

Unhandled Exception: System.IO.IOException: Read failure --->
System.Net.Sockets
.SocketException: An existing connection was forcibly closed by the remote
host.


  at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset,
Int3
2 size, SocketFlags flags) [0x00000] in <filename unknown>:0
  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32
offset,
Int32 size) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32
offset,
Int32 size) [0x00000] in <filename unknown>:0
  at System.IO.Stream.ReadByte () [0x00000] in <filename unknown>:0
  at
System.ServiceModel.Channels.NetTcp.TcpBinaryFrameManager.ProcessPreambleAc
kInitiator () [0x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.NetTcp.TcpDuplexSessionChannel.OnOpen
(TimeSpa
n timeout) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan
timeout) [0
x00000] in <filename unknown>:0
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.OnOpen (TimeSpan
time
out) [0x00000] in <filename unknown>:0
  at System.ServiceModel.MonoInternal.DuplexClientRuntimeChannel.OnOpen
(TimeSpa
n timeout) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan
timeout) [0
x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.CommunicationObject.Open () [0x00000] in
<file
name unknown>:0
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess
(System.Ref
lection.MethodBase method, System.String operationName, System.Object[]
paramete
rs) [0x00000] in <filename unknown>:0
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process
(System.Refle
ction.MethodBase method, System.String operationName, System.Object[]
parameters
) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Read failure --->
Syst
em.Net.Sockets.SocketException: An existing connection was forcibly closed
by th
e remote host.


Is this something which isn't supported by Mono? If I run my client and
server on Windows then it works fine, but when I run the client in mono
command prompt I get the error above.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20120703/00ba4ffb/attachment.html>


More information about the Mono-list mailing list