WCF - Disabling security in nettcpbinding (c#)
Asked Answered
G

1

6

I'm trying to make a self hosted WCF app that uses nettcpbinding but works in an environment without a domain.

It's just two regular windows pc's, one is the server and the other one will be the client. The problem with this is that when I try to get the client to connect it's rejected because of the security settings.

Can you please point me in the right direction as to how I can get this scenario to work?

Should I (if possible) disable security? Is there another (hopefully simple) way to accomplish this?

Regards,

Daniel

Giselegisella answered 30/4, 2010 at 22:47 Comment(0)
S
2

If you'd like to disable security for testing purposes, in the App.config of the WCF project, change the security element to <security mode="None" />, e.g.:

<bindings>
  <netTcpBinding>
    <binding name="netTcpBindingConfig" transferMode="Buffered" maxReceivedMessageSize="5242880">
      <readerQuotas maxArrayLength="5242880" />
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>

If you have a client, update the service reference to sync the security settings. Keep in mind that you should use some level of security in production environments.

Sullins answered 30/4, 2010 at 23:36 Comment(1)
Thanks for the info. I'll try it out and see how it goes.Giselegisella

© 2022 - 2024 — McMap. All rights reserved.