raksmart活动促销

分享

写回答

发帖

Arivxe Win 的空间 如何设置web.config 能够屏蔽ip?

国外虚拟主机 国外虚拟主机 2832 人阅读 | 4 人回复

发表于 2012-8-3 06:04:19 | 显示全部楼层 |阅读模式

本帖最后由 gs8604 于 2012-8-3 06:10 AM 编辑

我在这里下载了个屏蔽国家ip的 "Web.config" 然后复制到文本文件上传到空间,但是发现有问题就是上传到 根目录下的 cgi-bin 文件夹替换掉原来的文件,没有任何效果,而且去控制面板也打不开 ”Web site “ 了,说明文件是有误的,请问是哪里出的问题呢?

https://www.countryipblocks.net/country_selection.php

举个例子,屏蔽 伯利兹城 BELIZE 的,网站会给出下面的web.config 上传到根目录的 cgi-bin 没效果,上传到根目录,空间会出现500错误,是哪里的问题呢?

忘了说了,我用的是 arvixe   --------   PersonalClass ASP PRo  (windows主机)


# Copyright 2012 Country IP Blocks LLC
#all rights reserved.
#This list may not be redistributed in any form.
#this list includes network data on the following countries:
#BELIZE
<?xml version="1.0"?>
<configuration>
<system.webServer>
<security>
<ipSecurity allowUnlisted="true">
<clear/>
<add ipAddress="181.41.0.0" subnetMask="255.255.128.0"/>
<add ipAddress="190.102.96.0" subnetMask="255.255.224.0"/>
<add ipAddress="190.106.88.0" subnetMask="255.255.248.0"/>
<add ipAddress="190.124.40.0" subnetMask="255.255.248.0"/>
<add ipAddress="190.197.0.0" subnetMask="255.255.192.0"/>
<add ipAddress="190.197.64.0" subnetMask="255.255.192.0"/>
<add ipAddress="200.1.125.0" subnetMask="255.255.255.0"/>
<add ipAddress="200.10.194.0" subnetMask="255.255.255.0"/>
<add ipAddress="200.32.192.0" subnetMask="255.255.224.0"/>
<add ipAddress="200.32.224.0" subnetMask="255.255.224.0"/>
</ipSecurity>
</security>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>

回答|共 4 个

lwbo1987

发表于 2012-8-3 15:00:30 | 显示全部楼层

这个应该是添加到根目录下的web.config文件吧
回复 支持 反对

使用道具 举报

gs8604

发表于 2012-8-3 15:03:38 | 显示全部楼层

lwbo1987 发表于 2012-8-3 03:00 PM
这个应该是添加到根目录下的web.config文件吧

恩 但是放到根目录就显示500错误,不知道怎么搞的
回复 支持 反对

使用道具 举报

lwbo1987

发表于 2012-8-3 15:35:56 | 显示全部楼层

500可能就是代码有问题
RAKSmart
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则