WCF中如何实现客户端和服务器之间的安全通信?
我的问题如下:
默认情况下,WCF 中客户端和服务器之间的通信(协议:TCP)是否加密?
我需要实现一个模型,其中只有授权的客户端集才能使用 WCF 服务器。我想到了在每个方法调用中传递 AUTH 结构作为参数的方法。这是实现这种安全性的最佳方法,还是有更简单/更好的方法?
Here are my questions:
By default, is the communication between client and server (protocol: TCP) in WCF encrypted?
I need to implement a model, where only an authorized set of clients can use a WCF server. I thought of something along passing an AUTH structure as a param inside each method call. Is this the best method to implement this kind of security, or is there an easier/better way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1)不
2)不,这绝对不是“最好”的方式。这是一种简单的方法,但不是一种非常灵活的方法,也不是微软推荐的方法。有很多不同的方法来保护 WCF 服务,因此我无法编写详尽的答案,但我建议您自己阅读一下。查看这篇文章。
1) No
2) No, that is definitely not the "best" way. It is an easy way, but not a very flexible way, and not the way Microsoft recommends. There are a lot of different ways to secure WCF services, so I cannot write an exhaustive answer, but I suggest that you read up on it yourself. Check this article.