and*_*oid 6 coldfusion coldfusion-10 iis-8 coldfusion-11 iis-8.5
如果我的ColdFusion脚本中有错误,我从IIS而不是ColdFusion收到500错误消息.只有当我在URL中提供文件名时才会发生这种情况,如果我打开没有脚本名称的URL(这将打开index.cfm),则不会发生这种情况.
例如:
我可以在我的3个ColdFusion平台中的2个重现此问题:
我的index.cfm和foobar.cfm:
<!--- provoke a coldfusion error --->
<cfset foo
Run Code Online (Sandbox Code Playgroud)
我的web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="PassThrough" />
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
对我来说,看起来与IIS 8和IIS 8.5的ColdFusion连接器有问题.
好的,我终于能够解决这个问题了.
问题
我在同一个IIS网站下的一个自己的虚拟目录中运行多个Web应用程序.事实证明,添加existingResponse="PassThrough"
到web.config只能在虚拟目录中部分工作.没有这个设置我从来没有得到任何ColdFusion错误,而是我总是看到IIS 500错误.如果我添加existingResponse="PassThrough"
虚拟目录的web.config,只有在您不直接调用.cfm脚本访问站点时才会转发ColdFusion错误(例如:example.com/而不是example.com/index.cfm).
解决方案
解决方案很简单.我只需要将existingResponse="PassThrough"
设置添加到根IIS网站的web.config中,一切正常.
我认为这是IIS 8和8.5中的一个错误,因为我在IIS 7.5服务器上进行了双重检查,并且我不必在根网站上添加该属性.
归档时间: |
|
查看次数: |
5126 次 |
最近记录: |