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

发布于 2025-01-05 03:11:30 字数 190 浏览 0 评论 0原文

我的问题如下:

  1. 默认情况下,WCF 中客户端和服务器之间的通信(协议:TCP)是否加密?

  2. 我需要实现一个模型,其中只有授权的客户端集才能使用 WCF 服务器。我想到了在每个方法调用中传递 AUTH 结构作为参数的方法。这是实现这种安全性的最佳方法,还是有更简单/更好的方法?

Here are my questions:

  1. By default, is the communication between client and server (protocol: TCP) in WCF encrypted?

  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待圉鍢 2025-01-12 03:11:30

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文