CSGO
V2EX  ›  IIS

iis8 设置自定义 404 后显示空白是怎么回事?

  •  
  •   CSGO · Jul 13, 2018 · 7871 views
    This topic created in 2861 days ago, the information mentioned may be changed or developed.
    例如访问一个没有的地址 http://wangyifang.com/test

    只显示空白,但是右键能看到页面代码呢!但是就是显示空白,这是怎么会是呢?
    1 replies    2018-07-15 00:36:03 +08:00
    mmdsun
        1
    mmdsun  
       Jul 15, 2018 via Android
    当发生 404 错误并且 default.asp 碰巧有任何其他错误(例如,SQL 查询超时)时,IIS 仅显示空白页而不显示实际错误。因为当显示自定义错误模块以显示页面时,IIS 期望页面正常工作。如果在此阶段发生任何错误(错误后处理),则跳回错误前处理阶段为时已晚。空白页是合理的。

    And enable "send errors to browser" for asp.
    Please check that again.
    <httpErrors errorMode="Custom">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/testdefault.asp" responseMode="ExecuteURL" />
    </httpErrors>

    和这个很像。
    https://forums.iis.net/t/1229075.aspx?Blank+screen+on+custom+error+404+page
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5953 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 02:05 · PVG 10:05 · LAX 19:05 · JFK 22:05
    ♥ Do have faith in what you're doing.