使用最低配置设置 wcf netTcpBinding
我有一项自行托管的服务。多个客户端连接该服务并使用它。我倾向于 tcp,因为它提供会话而无需任何额外代码,并且希望能提高性能。
客户端(wpf 应用程序)都有一个用户名和密码,我将其存储在服务器上的数据库中。现在的问题是如何设置此绑定?安全要求不是很高,我更喜欢简单的解决方案。
我对 wcf 和一般服务非常陌生。我认为我可以使用证书进行身份验证,但不知道它们是如何工作的。对windows认证也不太了解。
回顾一下:
我将用户名/密码存储在服务器上。 我需要使用尽可能少的配置让 tcpBinding 在互联网上工作 安全不是主要问题 客户端计算机不在我的域中。
如果问题太广泛,那么资源链接,甚至是我应该查看的内容的指针将不胜感激。
I have a service which will be self hosted. Multiple clients connect ot the service and consume it. I am leaning towards tcp as it provides sessions without any extra code and also hopefully a perpormance boost.
The clients(wpf application) all have a username and password that I store in a db on the server. Now the question is how do I set this binding up? The security requirements are not very high and I'd prefer a simple solution.
I am very new to wcf and services in general. I gathered that I could use certificates for authentication, but have no clue how they work. Don't know much about windows authentication either.
To recap:
I store username/password on server.
I need to get the tcpBinding working over the internet with as little configuration as possible
Security is not a major concern
Client computers not in my domain.
If the question is too broad, links to resources, even pointers to what I should be looking at would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于这种情况,您应该使用 https 上的 basichttpbinding。
原因是:
这是一个示例:http://msdn.microsoft.com/en-us/library/ms731361.aspx
要使 https 正常工作,请将安全模式设置为传输。
For this scenario you should use basichttpbinding over https.
The reasons for this are:
Here is an example: http://msdn.microsoft.com/en-us/library/ms731361.aspx
To get the https to work set the security mode to transport.