Monday, November 26, 2012

iis7.5错误,出现打开网页错误,提示

刚才,打开网页时,IIS7.5突然出现zend framework模块下Access-Control-Allow-Origin重复添加的问题,作此记录.

应用程序“DEFAULT WEBSITE”中的服务器错误
Internet Information Services 7.5
错误摘要
HTTP 错误 500.19 - Internal Server Error
无法访问请求的页面,因为该页的相关配置数据无效。
详细错误信息
模块 ProtocolSupportModule
通知 SendResponse
处理程序 ZendPHPviaFastCGI
错误代码 0x800700b7
配置错误 在唯一密钥属性“name”设置为“Access-Control-Allow-Origin”时,无法添加类型为“add”的重复集合项
配置文件 \\?\D:\doc\webserver\wwwroot\discuz\web.config
请求的 URL http://localhost:80/discuz/source/plugin/pk17s_cn/replynew.php?mod=replysend&iid=17360
物理路径 D:\doc\webserver\wwwroot\discuz\source\plugin\pk17s_cn\replynew.php
登录方法 匿名
登录用户 匿名
配置源
8: <customHeaders>
9: <add name="Access-Control-Allow-Origin" value="*" />
10: <add name="Access-Control-Allow-Headers" value="X-Requested-With" />
链接和更多信息
当读取 Web 服务器或 Web 应用程序的配置文件出现问题时,就会发生此错误。在某些情况下,事件日志会包含有关导致此错误的原因的更多信息。
查看更多信息 »



原因是,我在wwwroot及wwwroot/discuz/下放了两个一模一样内容的web.config文件.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="X-Requested-With" />
</customHeaders>
</httpProtocol>
<urlCompression doStaticCompression="true" />
</system.webServer>
</configuration>


删除wwwroot/discuz/的web.config即可解决.

No comments: