简体   繁体   English

如何在WCF中实现客户端和服务器之间的安全通信?

[英]How to implement secure communication between client and server in WCF?

Here are my questions: 这是我的问题:

  1. By default, is the communication between client and server (protocol: TCP) in WCF encrypted? 默认情况下,WCF中客户端和服务器之间的通信(协议:TCP)是否已加密?

  2. I need to implement a model, where only an authorized set of clients can use a WCF server. 我需要实现一个模型,在该模型中,只有一组授权的客户端才能使用WCF服务器。 I thought of something along passing an AUTH structure as a param inside each method call. 我想到了在每个方法调用中传递AUTH结构作为参数的过程。 Is this the best method to implement this kind of security, or is there an easier/better way of doing this? 这是实现这种安全性的最佳方法,还是有一种更简单/更好的方法呢?

1) No 1)没有

2) No, that is definitely not the "best" way. 2)不,那绝对不是“最佳”方法。 It is an easy way, but not a very flexible way, and not the way Microsoft recommends. 这是一种简单的方法,但不是一种非常灵活的方法,也不是Microsoft推荐的方法。 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. 许多不同的方法来保护WCF服务,因此我无法写出详尽的答案,但是我建议您自己仔细阅读。 Check this article . 检查这篇文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM