当前位置:编程学习 > asp >>

关于500-100.asp

答案:有件事情我觉得很奇怪,我装的Windows 2000 Advanced Server(English)从来没有过不能显示完整错误信息的事情,所以后来我看见别人的机器不显示错误的时候感到非常的惊讶。是跟AS有关还是跟英文版有关?我装好机器后没有修改过任何设置和文件就这样。
我检查500-100.asp的Created Date和我装系统的时间一致,修改时间是1999-11-19。
内容如下:
<%@ language="VBScript" %>
<%
  Option Explicit

  Const lngMaxFormBytes = 200

  Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP
  Dim strMethod, lngPos, datNow, strQueryString, strURL

  If Response.Buffer Then
    Response.Clear
    Response.Status = "500 Internal Server Error"
    Response.ContentType = "text/html"
    Response.Expires = 0
  End If

  Set objASPError = Server.GetLastError
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<html dir=ltr>

<head>
<style>
a:link            {font:8pt/11pt verdana; color:FF0000}
a:visited        {font:8pt/11pt verdana; color:#4e4e4e}
</style>

<META NAME="ROBOTS" CONTENT="NOINDEX">

<title>The page cannot be displayed</title>

<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</head>

<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm

    //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
    DocURL=document.URL;
    
    //this is where the http or https will be, as found by searching for :// but skipping the res://
    protocolIndex=DocURL.indexOf("://",4);
    
    //this finds the ending slash for the domain server
    serverIndex=DocURL.indexOf("/",protocolIndex + 3);

    //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
    //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
    //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
    BeginURL=DocURL.indexOf("#",1) + 1;
    urlresult=DocURL.substring(BeginURL,serverIndex);
        
    //for display, we need to skip after http://, and go to the next slash
    displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
    document.write('<A HREF=>}
//-->
</script>

<body bgcolor="FFFFFF">

<table width="410" cellpadding="3" cellspacing="5">

  <tr>    
    <td align="left" valign="middle" width="360">
    <h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->The page cannot be displayed</h1>
    </td>
  </tr>
  
  <tr>
    <td width="400" colspan="2">
    <font style="COLOR:000000; FONT: 8pt/11pt verdana">There is a problem with the page you are trying to reach and it cannot be displayed.</font></td>
  </tr>
  
  <tr>
    <td width="400" colspan="2">
    <font style="COLOR:000000; FONT: 8pt/11pt verdana">

    <hr color="#C0C0C0" noshade>
    
    <p>Please try the following:</p>

    <ul>
      <li id="instructionsText1">Click the
      <a href=>      Refresh</a> button, or try again later.<br>
      </li>
      
      <li>Open the
      
      <script>
      <!--
      if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
      {
           Homepage();
      }
      //-->
      </script>

      home page, and then look for links to the information you want. </li>
    </ul>
    
    <h2 style="font:8pt/11pt verdana; color:000000">HTTP 500.100 - Internal Server
    Error - ASP error<br>
    Internet Information Services</h2>

    <hr color="#C0C0C0" noshade>
    
    <p>Technical Information (for support personnel)</p>

<ul>
<li>Error Type:<br>
<%
  Dim bakCodepage
  on error resume next
      bakCodepage = Session.Codepage
      Session.Codepage = 1252
  on error goto 0
  Response.Write Server.HTMLEncode(objASPError.Category)
  If objASPError.ASPCode > "" Then Response.Write Server.HTMLEncode(", " & objASPError.ASPCode)
  Response.Write Server.HTMLEncode(" (0x" & Hex(objASPError.Number) & ")" ) & "<br>"

  If objASPError.ASPDescription > "" Then
        Response.Write Server.HTMLEncode(objASPError.ASPDescription) & "<br>"

  elseIf (objASPError.Description > "") Then
         Response.Write Server.HTMLEncode(objASPError.Description) & "<br>"
  end if



  blnErrorWritten = False

  ' Only show the Source if it is available and the request is from the same machine as IIS
  If objASPError.Source > "" Then
    strServername = LCase(Request.ServerVariables("SERVER_NAME"))
    strServerIP = Request.ServerVariables("LOCAL_ADDR")
    strRemoteIP =  Request.ServerVariables("REMOTE_ADDR")
    If (strServername = "localhost" Or strServerIP = strRemoteIP) And objASPError.Fil

上一个:微软的这篇文章能彻底解决visual interdev的调试问题(那位仁兄E文好,把她翻译一下)
下一个:left() 函数是 VBScript 的函数,VBScript 将1个汉字看作1个字符,因此用 left()不能得到正确的字符长度...

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,