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

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

问题描述

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



为了更好地理解这个场景,假设该网站的域名为 www.sample.com ,并且所有互联网都可以访问本网站上的每个地址。例如, www.sample.com\path1 www.sample.com \ path2 可供所有人浏览那里的每个IP地址。



但是网络服务的地址 www.sample.com \services\user.asmx 只能从某些IP地址访问,例如 217.218.192.50 && 107.50.27.30 例如。



如何在IIS7中实现此配置?

解决方案

好的,这是一个简单的动作。



只需选择IIS7中的文件夹,从右侧选择 IP地址和域名限制(如果不可见,必须通过功能查看 tab)。



现在,您可以允许或拒绝任何单个IP地址,或者如果IP地址看到或未看到您的文件夹及其中的任何内容,则允许或拒绝。 / p>

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?

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.com\path1 and www.sample.com\path2 are browsable by everyone and every IP address out there.

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

How can I achieve this configuration in IIS7?

解决方案

OK, what a simple action it was.

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).

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天全站免登陆