CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

有没有办法让2000的IIS5.0在出错的时候显示详细的出错信息。

楼主lishu1980(IT工人)2002-01-08 12:50:08 在 Web 开发 / ASP 提问

就是不要只显示什么“0x800fd900”,能象PWS里的那样就可以了。 问题点数:20、回复次数:4Top

1 楼julyclyde(Java初学(大学不教只好自己学))回复于 2002-01-08 12:57:27 得分 0

0x800fd900这些不是IIS不让显示而是实在显示不出来Top

2 楼beyond_xiruo(CorruptionException)回复于 2002-01-08 13:00:32 得分 0

浏览器上的:  
  工具-->Internet选项-->高级-->浏览-->显示友好http错误信息。取消选中状态就可以了!Top

3 楼mkiss(小kiss)回复于 2002-01-08 13:18:45 得分 20

把下面的保存为500-100.asp文件覆盖原来的  
  <%@   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:9pt   宋体;   color:FF0000}  
  a:visited                 {font:9pt   宋体;   color:#4e4e4e}  
  </style>  
   
  <META   NAME="ROBOTS"   CONTENT="NOINDEX">  
   
  <title>本页无法显示</title>  
   
  <META   HTTP-EQUIV="Content-Type"   Content="text-html;   charset=gb2312">  
  <META   NAME="MS.LOCALE"   CONTENT="ZH-CN">  
  </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="'   +   urlresult   +   '">'   +   displayresult   +   "</a>");  
  }  
  //-->  
  </script>  
   
  <body   bgcolor="FFFFFF">  
   
  <table   width="410"   cellpadding="3"   cellspacing="5">  
   
      <tr>          
          <td   align="left"   valign="middle"   width="360">  
          <h1   style="COLOR:000000;   FONT:   9pt   宋体"><!--Problem-->本页无法显示</h1>  
          </td>  
      </tr>  
       
      <tr>  
          <td   width="400"   colspan="2">  
          <font   style="COLOR:000000;   FONT:   9pt   宋体">试图访问的网页出现问题,无法显示。</font></td>  
      </tr>  
       
      <tr>  
          <td   width="400"   colspan="2">  
          <font   style="COLOR:000000;   FONT:   9pt   宋体">  
   
          <hr   color="#C0C0C0"   noshade>  
           
          <p>请尝试以下方法:</p>  
   
          <ul>  
              <li   id="instructionsText1">单击    
              <a   href="javascript:location.reload()">  
              刷新</a>按钮或者梢候再试。<br>  
              </li>  
               
              <li>打开    
               
              <script>  
              <!--  
              if   (!((window.navigator.userAgent.indexOf("MSIE")   >   0)   &&   (window.navigator.appVersion.charAt(0)   ==   "2")))  
              {  
                        Homepage();  
              }  
              //-->  
              </script>  
   
              主页,然后查找与所需信息相关的链接。   </li>  
          </ul>  
           
          <h2   style="FONT:   9pt   宋体;   color:000000">HTTP   500.100   -   内部服务器错误   -   ASP   错误<br>  
          Internet   信息服务</h2>  
   
          <hr   color="#C0C0C0"   noshade>  
           
          <p>技术信息(适用于支持人员)</p>  
   
  <ul>  
  <li>错误类型:<br>  
  <%  
      Dim   bakCodepage  
      bakCodepage   =   Session.Codepage  
      Session.Codepage   =   936  
      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>"  
   
      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.File   <>   "?"   Then  
              Response.Write   Server.HTMLEncode(objASPError.File)  
              If   objASPError.Line   >   0   Then   Response.Write   ",   第   "   &   objASPError.Line   &   "   行"  
              If   objASPError.Column   >   0   Then   Response.Write   ",   第   "   &   objASPError.Column   &   "   列"  
              Response.Write   "<br>"  
              Response.Write   "<font   style=""COLOR:000000;   FONT:   9pt   宋体""><b>"  
              Response.Write   Server.HTMLEncode(objASPError.Source)   &   "<br>"  
              If   objASPError.Column   >   0   Then   Response.Write   String((objASPError.Column   -   1),   "-")   &   "^<br>"  
              Response.Write   "</b></font>"  
              blnErrorWritten   =   True  
          End   If  
      End   If  
   
      If   Not   blnErrorWritten   And   objASPError.File   <>   "?"   Then  
          Response.Write   "<b>"  
          Response.Write   Server.HTMLEncode(objASPError.File)  
          If   objASPError.Line   >   0   Then   Response.Write   Server.HTMLEncode(",   第   "   &   objASPError.Line   &   "   行")  
          If   objASPError.Column   >   0   Then   Response.Write   ",   第   "   &   objASPError.Column   &   "   列"  
  '-------------------------------------------------------------------  
  '   added   by   Bigeagle  
  '   date:     2000/5/10  
   
          dim   l_strAspDescription  
          l_strAspDescription   =   "错误原因:"   +   objASPError.Description()  
          if   l_strAspDescription   <>   ""   then  
                response.write("<p>"   +   l_strAspDescription+   "</p>")  
          end   if  
   
          l_strAspDescription   =   "详细描述:"   +   objASPError.ASPDescription()  
          if   l_strAspDescription   <>   ""   then  
                response.write("<p>"   +   l_strAspDescription+   "</p>")  
          end   if  
   
  '-------------------------------------------------------------------    
          Response.Write   "</b><br>"  
      End   If  
  %>  
  </li>  
  <p>  
  <li>浏览器类型:<br>  
  <%=   Request.ServerVariables("HTTP_USER_AGENT")   %>  
  </li>  
  <p>  
  <li>页:<br>  
  <%  
      strMethod   =   Request.ServerVariables("REQUEST_METHOD")  
   
      Response.Write   strMethod   &   "   "  
   
      If   strMethod   =   "POST"   Then  
          Response.Write   Request.TotalBytes   &   "   bytes   to   "  
      End   If  
   
      Response.Write   Request.ServerVariables("SCRIPT_NAME")  
   
      lngPos   =   InStr(Request.QueryString,   "|")  
   
      If   lngPos   >   1   Then  
          Response.Write   "?"   &   Left(Request.QueryString,   (lngPos   -   1))  
      End   If  
   
      Response.Write   "</li>"  
   
      If   strMethod   =   "POST"   Then  
          Response.Write   "<p><li>POST   数据:<br>"  
          If   Request.TotalBytes   >   lngMaxFormBytes   Then  
                Response.Write   Server.HTMLEncode(Left(Request.Form,   lngMaxFormBytes))   &   "   .   .   ."  
          Else  
              Response.Write   Server.HTMLEncode(Request.Form)  
          End   If  
          Response.Write   "</li>"  
      End   If  
   
  %>  
  <p>  
  <li>时间:<br>  
  <%  
      datNow   =   Now()  
   
      Response.Write   Server.HTMLEncode(FormatDateTime(datNow,   1)   &   ",   "   &   FormatDateTime(datNow,   3))  
      Session.Codepage   =   bakCodepage  
  %>  
  </li>  
  </p>  
  <p>  
  <li>详细信息:<br>  
  <%     strQueryString   =   "prd=iis&sbp=&pver=5.0&ID=500;100&cat="   &   Server.URLEncode(objASPError.Category)   &   _  
          "&os=&over=&hrd=&Opt1="   &   Server.URLEncode(objASPError.ASPCode)     &   "&Opt2="   &   Server.URLEncode(objASPError.Number)   &   _  
          "&Opt3="   &   Server.URLEncode(objASPError.Description)    
                strURL   =   "http://www.microsoft.com/ContentRedirect.asp?"   &   _  
          strQueryString  
  %>  
  <a   href="<%=   strURL   %>">Microsoft   支持</a>  
  </li>  
  </p>  
   
          </font></td>  
      </tr>  
       
  </table>  
  </body>  
  </html>    
  Top

4 楼hmbory(玻璃心)回复于 2002-01-08 13:33:21 得分 0

捕捉错误显示!Top

相关问题

  • 急,IIS出错!!!
  • IIS出错
  • IIS 出错
  • WEB 中更新ACCESS文件出错!有详细的IIS中文件操作权限设置吗?
  • 请问如何关闭iis的向客户端发送详细出错信息的功能?
  • 程序出错我没办法。请看
  • 救命!iis突然出错!!
  • tomcat运行jsp出错。(请各位能详细指点,谢谢。)
  • 请问有谁有gcc的出错信息的详细说明?
  • dll里用了list,编译出错,详细请进。。。

关键词

  • 信息
  • source
  • server
  • objasperror
  • straspdescription
  • htmlencode
  • aspdescription
  • response
  • blnerrorwritten
  • write

得分解答快速导航

  • 帖主:lishu1980
  • mkiss

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo