如何禁用其他域中的Web服务调用 [英] how to disable WebService call from other domains
问题描述
我想避免别人来访问我的web服务。
i want to avoid the others to access my webservice.
我有Web服务被称为WebService.asmx,这是在www.xyz.com托管
我们知道,我们可以像访问服务
http://www.xyz.com/WebService.asmx
I have Web Service called WebService.asmx, which is hosted in www.xyz.com and we know that we can access the service like http://www.xyz.com/WebService.asmx
- 如何避免列出所有功能
- 其他不应添加为Web引用,他们应该叫我的Web服务功能
请帮我解决了这些问题,我的项目正在运行,我想避免这个问题...
please help me to solved these issues, my project is running and i want to avoid this issues...
先感谢
推荐答案
这样做是为了你的所有要求你的方法进行验证,并拒绝未认证的呼叫的一种方式。一个非常详细的给出答复<一个href=\"http://stackoverflow.com/questions/1400198/is-there-a-way-to-restrict-access-to-an-asmx-webservice-i-e-the-asmx-page-and\">here.
One way of doing this is to authenticate all your requests to your methods and reject the calls that are not authenticated. A very detailed answer is given here.
这篇关于如何禁用其他域中的Web服务调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!