WCF duplex service using net tcp: “Stream Security is required…”

强颜欢笑 提交于 2019-12-01 06:46:39

Well, your problem appears to be this:

  • on the server side, you use a default netTCP binding with no parameters - you don't change anything on it. netTCP defaults to transport-level security with Windows credentials

  • on your client however, you explicitly turn OFF any security on the netTCP binding

So the two don't match and don't agree on what to do.

Either you need to turn OFF all security on BOTH ends - server AND client - or you need to just use the secure defaults (with Windows credentials).

Marc

I think it turns out this is one of those horrible error messages that leads you into many different directions. The above answers is correct for that case. My case was different - my security settings were identical on client and serve.

In my case, this link pointed out my particular flaw: http://www.netframeworkdevs.com/windows-communication-foundation-wcf/error-invoking-service-with-a-net-tcp-binding-123918.shtml.

My service-side app.config for the Endpoint had bindingName as the attribute to name the binding configuration ... instead of bindingConfiguration. I don't think there even is an attribute named bindingName on an endpoint.

So ... my take away is that this error means "there is a WCF configuration error" perhaps narrowed to the service-side configuration. Ugh.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!