WCF - 禁用 nettcpbinding 中的安全性 (c#)
我正在尝试制作一个自托管的 WCF 应用程序,该应用程序使用 nettcpbinding 但可以在没有域的环境中工作。
它只是两台普通的 Windows 电脑,一台是服务器,另一台是客户端。问题在于,当我尝试让客户端连接时,由于安全设置而被拒绝。
您能否为我指出正确的方向,让我如何让这个场景发挥作用?
我应该(如果可能)禁用安全性吗? 还有另一种(希望是简单的)方法来完成此任务吗?
问候,
丹尼尔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想出于测试目的禁用安全性,请在 WCF 项目的 App.config 中将安全性元素更改为
,例如:如果您有客户端,更新服务引用以同步安全设置。请记住,您应该在生产环境中使用某种级别的安全性。
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.: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.