IIS7 中 Web 应用程序文件夹的 IP 限制 [英] IP restriction for a folder of a web application, in IIS7

查看:37
本文介绍了IIS7 中 Web 应用程序文件夹的 IP 限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Web 应用程序,其中一个 Web 服务位于一个文件夹中.整个 Web 应用程序可以从任何地方访问,而 Web 服务只能从某些 IP 地址访问.我无法将它们分开并将 Web 服务带入另一个 IIS 网站,因此我需要限制对 Web 服务的访问,而它驻留在该网站中.但是,我在创建虚拟目录方面没有任何限制.我该怎么办?我能做到吗?

I have a web application, in which a web service resides in a folder. The whole web application can be accessed from anywhere, while the web service should only be accessed from certain IP addresses. I can't separate them and take the web service into another IIS web site, thus I need to restrict the access to the web service, while it resides in that web site. However, I have no limitation in creating virtual directories. What should I do? Can I do it at all?

为了更好地理解这个场景,假设网站的域名是www.sample.com,并且这个网站上的每个地址都可以访问整个互联网.例如,www.sample.compath1www.sample.compath2 可供所有人和所有 IP 地址浏览.

To understand the scenario better, suppose that the domain of the website is www.sample.com, and every address on this website is accessible to all the Internet. For example, www.sample.compath1 and www.sample.compath2 are browsable by everyone and every IP address out there.

但是网络服务www.sample.comservicesuser.asmx的地址只能从特定的IP地址访问,比如217.218.192.50 &&以 107.50.27.30 为例.

But the address of the web service www.sample.comservicesuser.asmx should only be accessed from certain IP addresses, like 217.218.192.50 && 107.50.27.30 for example.

如何在 IIS7 中实现这种配置?

How can I achieve this configuration in IIS7?

推荐答案

好吧,这是一个多么简单的操作.

OK, what a simple action it was.

只需选择 IIS7 中的文件夹,然后从右侧选择 IP 地址和域限制(如果不可见,必须通过 Features View 选项卡访问).

Simply select the folder in IIS7, and from the right hand, select IP Address and Domain Restrictions (which if is not visible, must be reached via Features View tab).

现在,您可以允许或拒绝任何单个 IP 地址或 IP 地址范围,以查看或不查看您的文件夹以及其中的任何内容.

Now, you can allow or deny any single IP address, or a range if IP addresses from seeing or not seeing your folder, and anything inside it.

这篇关于IIS7 中 Web 应用程序文件夹的 IP 限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆