2011-03-23 71 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

相关问题