简体   繁体   English

在WCF Ria服务中,是否可以其他连接到我的服务? 如果是,我如何禁止它

[英]In WCF Ria Services, is it possible to other to connect to my Service? If yes, how can I ban it

Is it possible for others to connect to my defined services in my Ria application? 其他人是否可以连接到我在Ria应用程序中定义的服务?

If yes, how can we remove this access? 如果是,我们如何删除此访问权限?

A very broad question! 一个非常广泛的问题! First of all, you cannot remove access, eg your URL will still be there and anyone pounding around might accidentally hit it - you can restrict access to your service by checking some claims / facts about the caller. 首先,您无法删除访问权限,例如您的URL仍然存在,并且碰到任何地方的人都可能会不小心点击它-您可以通过检查有关呼叫者的一些声明/事实来限制对服务的访问。

Since a WCF RIA Service is fundamentally a WCF service, you can use any of the WCF mechanisms to secure your service (warning: I'm not familiar with Silverlight, so not all of these might be available / feasible for the limited world of Silverlight clients....): 由于WCF RIA服务从根本上说是WCF服务,因此您可以使用任何WCF机制来保护您的服务(警告:我对Silverlight不熟悉,因此对于受限的Silverlight世界来说,并非所有这些功能都可用/可行)客户....):

  • require the user to be a valid Windows identity (in Intranet scenarios) 要求用户为有效的Windows身份(在Intranet方案中)
  • require a certificate with the caller 要求呼叫者提供证书
  • require a specific header in each message 在每封邮件中要求一个特定的标题
  • check the caller's IP 检查呼叫者的IP

One fairly straightforward solution is being presented here: 这里提出了一种相当简单的解决方案:

Restricting Access to your WCF Service to a known Silverlight Client 限制对已知的Silverlight客户端的WCF服务访问

But again - that's just one possible solution out of a vast number of possibilities. 但是,这再次是众多可能性中的一种可能的解决方案。

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

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