WCF tcp.net client/server connection failing "Stream Security is required"

Posted by Tom W. on Stack Overflow See other posts from Stack Overflow or by Tom W.
Published on 2010-05-17T00:46:41Z Indexed on 2010/05/17 0:50 UTC
Read the original article Hit count: 1376

Filed under:
|
|

I am trying to test a simple WCF tcp.net client/server app. The WCF service is being hosted on Windows 7 IIS. I have enabled TCP.net in IIS. I granted liberal security privileges to service app by configuring an app pool with admin rights and set the IIS service application to run in the context.

I enabled tracing on the service app to troubleshoot. Whenever I run a simple method call against the service from the WCF client app, I get the following exception:

"Stream Security is required at http://www.w3.org/2005/08/addressing/anonymous, but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding."

Here is my client configuration:

<bindings>
  <netTcpBinding>
    <binding name="InsecureTcp">
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>

Here is my service configuration:

<bindings>
  <netTcpBinding>
    <binding name="InsecureTcp"  >
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>

<services>
  <service name="OrderService" behaviorConfiguration="debugServiceBehavior">
    <endpoint
        address=""
        binding="netTcpBinding"
        bindingConfiguration="InsecureTcp"
        contract="ProtoBufWcfService.IOrder" />
  </service>
</services>

<behaviors>

  <serviceBehaviors>
    <behavior name="debugServiceBehavior">
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>

  </serviceBehaviors>
</behaviors>

© Stack Overflow or respective owner

Related posts about wcf

Related posts about connection