开发者

Can I restrict a WCF Web Service to only calls from a certain domain?

I have a web service t开发者_JS百科hat is externally facing but I would like it only to be consumed by callers from a certain domain?

Is that possible? and if possible, is that advisable? And if advisable, how do I go about implementing this?

UPDATE : unfortunately, I can't use AD as it's an external org that will be accessing this website. So for example, I only want say, say the external org is yahoo, I only want calls from yahoo to be able to access the web service.


when you say domain, are you referring to a network domain name or internet domain name?

I think you are referring to a internet domain name, but if that is the case IP address is the only thing i think you can use as people who work at yahoo, don't have ip addresses that are associated with yahoo.com for instance. There could be a range of external ips that have been reserved for the entire company that you could filter on.

Another way of ensuring that only certain people access your external webservice is to pass it some kind of passcode in the data, but this may be out of scope/unchangeable.


  • Using Web.config you may only restrict access by certain IPs, at least because client always have IP, but may have no associated DNS name

  • However, if you mean allow access for certain AD users, then a tons of answers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜