IIS7 Hijacks My Coldfusion Error Page

做~自己de王妃 提交于 2019-12-01 16:19:39

This might help:

<configuration>
  <system.webServer>
    <httpErrors existingResponse="PassThrough" />
  </system.webServer>
</configuration>

For more information:

HTTP Errors (IIS.NET)
What to expect from IIS7 custom error module (IIS.NET)

If that doesn't work then you might try writing a .NET HttpModule to plug into the IIS request/response pipeline to set Response.TrySkipCustomErrors. Not ideal.

ASP.NET's worker request object calls an exported function called MgdSetStatusW. The problem here is that unless Coldfusion exposes this flag then you won't be able to set the value directly in CF.

Poking around with .NET Reflector I seen ASP.NET setting the response status using:

[DllImport("webengine4.dll", CharSet=CharSet.Unicode)]
internal static extern int MgdSetStatusW(IntPtr pRequestContext, 
    int dwStatusCode, int dwSubStatusCode, string pszReason, 
    string pszErrorDescription, bool fTrySkipCustomErrors);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!