2011-03-23 35 views
1

有沒有任何方法可以更改此錯誤消息?當樹脂不運行,所以我覺得這是一個IIS6錯誤消息,但該頁面的源代碼,這似乎顯示了這個文本註釋:Resin 3.0.18/IIS6服務器出現故障消息「服務器當前不可用或因維護而關閉」

  • 不幸的是,微軟增加了一個聰明的新
  • 「功能」到Internet Explorer。如果
  • 一個錯誤的消息文本是「太小」,特別是
  • 小於512個字節,而Internet Explorer返回
  • 它自己的錯誤消息。是的,你可以反過來說,
  • 關閉,但驚喜這是非常難找到
  • 埋作爲一個切換的「智能錯誤
  • 消息」這意味着,當然,很多的
  • 樹脂的錯誤消息在默認情況下被審查。
  • ,當然,你會震驚地獲悉,
  • IIS總是返回長
  • 足以使Internet Explorer快樂的錯誤消息。該
  • 解決方法很簡單:墊大的註釋錯誤
  • 消息在
  • 512字節的最低推。當然,
  • 這正是你現在正在閱讀的內容。

我在IIS6或Resin的文檔中找不到任何此錯誤消息。

回答

1

如果我沒有記錯,Resin和其他一些Web服務器將HTML註釋添加到錯誤頁面來填充消息,以便顯示真正的錯誤。

例如所看到的網絡上http://weblogtoolscollection.com/archives/2004/06/22/lame-internet-explorer-script-error-message/

樣品評論:

<!–- 
    Unfortunately, Microsoft has added a clever new 
    「feature」 to Internet Explorer. If the text in 
    an error’s message is 「too small」, specifically 
    less than 512 bytes, Internet Explorer returns 
    its own error message. Yes, you can turn that 
    off, but *surprise* it’s pretty tricky to find 
    buried as a switch called 「smart error 
    messages」 That means, of course, that many of 
    Resin’s error messages are censored by default. 
    And, of course, you’ll be shocked to learn that 
    IIS always returns error messages that are long 
    enough to make Internet Explorer happy. The 
    workaround is pretty simple: pad the error 
    message with a big comment to push it over the 
    five hundred and twelve byte minimum. Of course, 
    that’s exactly what you’re reading right now. 
--> 

我要指出,這個消息應該在頁面(例如不可見),如果它是可見的,出了問題的註釋。例如也許該文件被作爲文本提供,而不是text/html?

+0

我可能會說這很糟糕。我只是引用評論來顯示它是一個Resin問題,即使Resin沒有啓動。我的問題是我在哪裏可以修改這個特定的錯誤,所以我可以改變頁面佈局?謝謝! – user673256 2011-03-23 17:13:10

相關問題