Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
6.6 KiB

  1. <%@ language="VBScript" %>
  2. <%
  3. Option Explicit
  4. Const lngMaxFormBytes = 200
  5. Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP
  6. Dim strMethod, lngPos, datNow, strQueryString, strURL
  7. If Response.Buffer Then
  8. Response.Clear
  9. Response.Status = "500 Internal Server Error"
  10. Response.ContentType = "text/html"
  11. Response.Expires = 0
  12. End If
  13. Set objASPError = Server.GetLastError
  14. %>
  15. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  16. <html dir=ltr>
  17. <head>
  18. <style>
  19. a:link {font:8pt/11pt verdana; color:FF0000}
  20. a:visited {font:8pt/11pt verdana; color:#4e4e4e}
  21. </style>
  22. <META NAME="ROBOTS" CONTENT="NOINDEX">
  23. <title>The page cannot be displayed</title>
  24. <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  25. </head>
  26. <script>
  27. function Homepage(){
  28. <!--
  29. // in real bits, urls get returned to our script like this:
  30. // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
  31. //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
  32. DocURL=document.URL;
  33. //this is where the http or https will be, as found by searching for :// but skipping the res://
  34. protocolIndex=DocURL.indexOf("://",4);
  35. //this finds the ending slash for the domain server
  36. serverIndex=DocURL.indexOf("/",protocolIndex + 3);
  37. //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
  38. //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
  39. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
  40. BeginURL=DocURL.indexOf("#",1) + 1;
  41. urlresult=DocURL.substring(BeginURL,serverIndex);
  42. //for display, we need to skip after http://, and go to the next slash
  43. displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
  44. document.write('<A HREF="' + urlresult + '">' + displayresult + "</a>");
  45. }
  46. //-->
  47. </script>
  48. <body bgcolor="FFFFFF">
  49. <table width="410" cellpadding="3" cellspacing="5">
  50. <tr>
  51. <td align="left" valign="middle" width="360">
  52. <h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->The page cannot be displayed</h1>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td width="400" colspan="2">
  57. <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>
  58. </tr>
  59. <tr>
  60. <td width="400" colspan="2">
  61. <font style="COLOR:000000; FONT: 8pt/11pt verdana">
  62. <hr color="#C0C0C0" noshade>
  63. <p>Please try the following:</p>
  64. <ul>
  65. <li id="instructionsText1">Click the
  66. <a href="javascript:location.reload()">
  67. Refresh</a> button, or try again later.<br>
  68. </li>
  69. <li>Open the
  70. <script>
  71. <!--
  72. if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
  73. {
  74. Homepage();
  75. }
  76. //-->
  77. </script>
  78. home page, and then look for links to the information you want. </li>
  79. </ul>
  80. <h2 style="font:8pt/11pt verdana; color:000000">HTTP 500.100 - Internal Server
  81. Error - ASP error<br>
  82. Internet Information Services</h2>
  83. <hr color="#C0C0C0" noshade>
  84. <p>Technical Information (for support personnel)</p>
  85. <ul>
  86. <li>Error Type:<br>
  87. <%
  88. Dim bakCodepage
  89. on error resume next
  90. bakCodepage = Session.Codepage
  91. Session.Codepage = 1252
  92. on error goto 0
  93. Response.Write Server.HTMLEncode(objASPError.Category)
  94. If objASPError.ASPCode > "" Then Response.Write Server.HTMLEncode(", " & objASPError.ASPCode)
  95. Response.Write Server.HTMLEncode(" (0x" & Hex(objASPError.Number) & ")" ) & "<br>"
  96. If objASPError.ASPDescription > "" Then
  97. Response.Write Server.HTMLEncode(objASPError.ASPDescription) & "<br>"
  98. elseIf (objASPError.Description > "") Then
  99. Response.Write Server.HTMLEncode(objASPError.Description) & "<br>"
  100. end if
  101. blnErrorWritten = False
  102. ' Only show the Source if it is available and the request is from the same machine as IIS
  103. If objASPError.Source > "" Then
  104. strServername = LCase(Request.ServerVariables("SERVER_NAME"))
  105. strServerIP = Request.ServerVariables("LOCAL_ADDR")
  106. strRemoteIP = Request.ServerVariables("REMOTE_ADDR")
  107. If (strServername = "localhost" Or strServerIP = strRemoteIP) And objASPError.File <> "?" Then
  108. Response.Write Server.HTMLEncode(objASPError.File)
  109. If objASPError.Line > 0 Then Response.Write ", line " & objASPError.Line
  110. If objASPError.Column > 0 Then Response.Write ", column " & objASPError.Column
  111. Response.Write "<br>"
  112. Response.Write "<font style=""COLOR:000000; FONT: 8pt/11pt courier new""><b>"
  113. Response.Write Server.HTMLEncode(objASPError.Source) & "<br>"
  114. If objASPError.Column > 0 Then Response.Write String((objASPError.Column - 1), "-") & "^<br>"
  115. Response.Write "</b></font>"
  116. blnErrorWritten = True
  117. End If
  118. End If
  119. If Not blnErrorWritten And objASPError.File <> "?" Then
  120. Response.Write "<b>" & Server.HTMLEncode( objASPError.File)
  121. If objASPError.Line > 0 Then Response.Write Server.HTMLEncode(", line " & objASPError.Line)
  122. If objASPError.Column > 0 Then Response.Write ", column " & objASPError.Column
  123. Response.Write "</b><br>"
  124. End If
  125. %>
  126. </li>
  127. <p>
  128. <li>Browser Type:<br>
  129. <%= Request.ServerVariables("HTTP_USER_AGENT") %>
  130. </li>
  131. <p>
  132. <li>Page:<br>
  133. <%
  134. strMethod = Request.ServerVariables("REQUEST_METHOD")
  135. Response.Write strMethod & " "
  136. If strMethod = "POST" Then
  137. Response.Write Request.TotalBytes & " bytes to "
  138. End If
  139. Response.Write Request.ServerVariables("SCRIPT_NAME")
  140. lngPos = InStr(Request.QueryString, "|")
  141. If lngPos > 1 Then
  142. Response.Write "?" & Left(Request.QueryString, (lngPos - 1))
  143. End If
  144. Response.Write "</li>"
  145. If strMethod = "POST" Then
  146. Response.Write "<p><li>POST Data:<br>"
  147. If Request.TotalBytes > lngMaxFormBytes Then
  148. Response.Write Server.HTMLEncode(Left(Request.Form, lngMaxFormBytes)) & " . . ."
  149. Else
  150. Response.Write Server.HTMLEncode(Request.Form)
  151. End If
  152. Response.Write "</li>"
  153. End If
  154. %>
  155. <p>
  156. <li>Time:<br>
  157. <%
  158. datNow = Now()
  159. Response.Write Server.HTMLEncode(FormatDateTime(datNow, 1) & ", " & FormatDateTime(datNow, 3))
  160. on error resume next
  161. Session.Codepage = bakCodepage
  162. on error goto 0
  163. %>
  164. </li>
  165. </p>
  166. <p>
  167. <li>More information:<br>
  168. <% strQueryString = "prd=iis&sbp=&pver=5.0&ID=500;100&cat=" & Server.URLEncode(objASPError.Category) & _
  169. "&os=&over=&hrd=&Opt1=" & Server.URLEncode(objASPError.ASPCode) & "&Opt2=" & Server.URLEncode(objASPError.Number) & _
  170. "&Opt3=" & Server.URLEncode(objASPError.Description)
  171. strURL = "http://www.microsoft.com/ContentRedirect.asp?" & _
  172. strQueryString
  173. %>
  174. <a href="<%= strURL %>">Microsoft Support</a>
  175. </li>
  176. </p>
  177. </font></td>
  178. </tr>
  179. </table>
  180. </body>
  181. </html>