首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

web.config不是说修改后马上生效的吗?该如何解决

2012-02-14 
web.config不是说修改后马上生效的吗?web.config1个放在/目录,另一个放在/study/目录,程序位置/study/stru

web.config不是说修改后马上生效的吗?
web.config   1个放在/目录,另一个放在/study/目录,程序位置/study/structuredErrorHandling.aspx


2个web.config的内容一样:
<?xml   version= "1.0 "   encoding= "utf-8 "   ?>
<configuration>
        <system.web>
                <trace   enabled= "true "/>
<customErrors   mode= "On "   defaultRedirect= "userError.aspx ">
<error   statusCode= "404 "   redirect= "PagenotFound.aspx "/>
</customErrors>
        </system.web>
</configuration>

structuredErrorHandling.aspx该页面有错误,按照上面的web.config,应该重定向到自定义的出错页面
重新修改web.config的内容:


<?xml   version= "1.0 "   encoding= "utf-8 "   ?>
<configuration>
        <system.web>
                <trace   enabled= "true "/>
<!--
<customErrors   mode= "On "   defaultRedirect= "userError.aspx ">
<error   statusCode= "404 "   redirect= "PagenotFound.aspx "/>
</customErrors>
-->

        </system.web>
</configuration>


按理说,再次在IE请求structuredErrorHandling.aspx文件,应该不会再显示自定义的错误了,但是结果还是重

定向到自定义的出错页面,重启IIS也无效,只有重启电脑才生效,为什么?

[解决办法]
重启服务应该就可以了阿
[解决办法]
奇了怪啦...楼上说的对
[解决办法]
你是改哪个web.config呢,是/study/目录下的吗?
[解决办法]
友情UP

热点排行