日期:2014-05-19  浏览次数:20408 次

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