【问题标题】:Resin 3.0.18 / IIS6 Server is down message "Server is currently unavailable or down for maintenance"Resin 3.0.18 / IIS6 服务器停机消息“服务器当前不可用或停机维护”
【发布时间】:2011-03-23 14:58:24
【问题描述】:

有没有办法改变这个错误信息?它在 Resin 未运行时出现,所以我认为这是一条 IIS6 错误消息,但页面的源代码显示此文本已注释掉:

  • 不幸的是,微软增加了一个聪明的新功能
  • “功能”到 Internet Explorer。如果文本在
  • 错误消息“太小”,特别是
  • 小于 512 字节,Internet Explorer 返回
  • 它自己的错误消息。是的,你可以把它转过来
  • 关闭,但惊喜很难找到
  • 隐藏为一个名为“智能错误”的开关
  • messages" 当然,这意味着很多
  • 默认情况下会审查 Resin 的错误消息。
  • 当然,得知这一点您会感到震惊
  • IIS 总是返回很长的错误消息
  • 足以让 Internet Explorer 开心。
  • 解决方法非常简单:填充错误
  • 带有重要评论的消息将其推送到
  • 最少 512 个字节。当然,
  • 这正是您现在正在阅读的内容。

我没有在 IIS6 或 Resin 的文档中找到此错误消息。

【问题讨论】:

    标签: iis-6 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.
    -->
    

    我应该注意,这条消息应该是页面上的评论(例如,不可见),如果它是可见的,则说明出现问题。例如也许文件是作为文本提供的,而不是文本/html?

    【讨论】:

    • 我的措辞可能很糟糕。我只是参考评论以表明这是一个 Resin 问题,即使 Resin 没有启动。我的问题是在哪里可以修改此特定错误以便更改页面布局?谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-12-15
    • 2014-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-13
    • 2018-07-27
    相关资源
    最近更新 更多