我该如何保护ASP.NET Web服务,只允许相对路径打电话? [英] How do I secure ASP.NET web service to only allow relative path calling?
本文介绍了我该如何保护ASP.NET Web服务,只允许相对路径打电话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我ASMX服务,为我的web应用程序,我只想提供给同一个应用程序。
I have ASMX services for my web application that I would only like available to the same application.
有没有办法为Web服务,只能由同一应用程序访问,如相对/绝对路径的限制?
Is there a way for the web service to only be accessible by the same application, such as relative/absolute path restrictions?
推荐答案
,最快的途径是只没有使用Web服务。如果你从同一个应用程序中调用,你可能只拉你的逻辑放到一个单独的类,并直接在code调用它,而不是通过Web服务。
The easiest route would be to just not use a web service. If you're calling from the same application, you can probably just pull your logic into a separate class, and call it directly in your code, not via web service.
这篇关于我该如何保护ASP.NET Web服务,只允许相对路径打电话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文