⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5.htm

📁 IIS5.0超级管理手册-网页开发篇 书籍语言: 简体中文 书籍类型: 网页设计 授权方式: 免费软件 书籍大小: 262 KB
💻 HTM
📖 第 1 页 / 共 5 页
字号:
   Application.Unlock
%>

 This application page has been visited
&lt;%=  Application (&quot;NumVisits&quot;) % &gt;  times!</pre>
    </font>
  </div>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  在上面的范例中,<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Unlock&nbsp;</b></font>方法释放了锁定的物件以便下个用户端可以增加NumVisits变数。</font></p>
  <hr style="line-height: 25px">
  <p>
  <font face="Arial" color="#3e77d7" size="3" Black style="line-height: 25px">
  <b style="line-height: 25px">说明</b></font> </p>
  <p><font face="arial" color="black" size="2" style="line-height: 25px">应用程式的<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;lock&nbsp;</b></font>方法是累积的,也就是如果同样的指令档使用了<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;lock&nbsp;</b></font>好几次,那麽它也必须使用<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Unlock&nbsp;</b></font>同样的次数来释放<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Application&nbsp;</b></font>物件中的变数。如果不这样做,<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Application&nbsp;</b></font>物件中对变数的锁定会持续到指令档执行完後。</font></p>
  <hr style="line-height: 25px">
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">应用<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;Application&nbsp;</b></font>物件</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">请参阅<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;lock&nbsp;</b></font>。</font></p>
  <a name="205002" style="line-height: 25px">
  <p><font face="arial" color="#3e70d7" size="5" style="line-height: 25px">
  <b style="line-height: 25px">ASPError物件<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">您可以使用<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;ASPError&nbsp;</b></font>物件来得到ASP网页的指令档中产生的错误状态资讯。<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;ASPError&nbsp;</b></font>物件是由<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Server. 
  GetLastError&nbsp;</b></font>方法传回,并使用唯读属性。</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">语法<br style="line-height: 25px">
 </b></font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">ASPError.property</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">属性<br style="line-height: 25px">
 </b></font></p>
  <center style="line-height: 25px">
  <table border="1" style="line-height: 25px">
    <tbody style="line-height: 25px">
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;ASPCode&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        传回一个IIS 5.0产生的错误代码。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Number&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        传回标准的COM错误代码。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Source&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        传回引起错误那行的实际来源码。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Category&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指出是否错误的来源是ASP内建的,或是指令档语言或物件。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;File&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指出错误发生时正在执行 .asp的档案名称。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Line&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指出错误发生时 .asp档案所在的行。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Column&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指出错误发生时 .asp档案所在的列。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Description&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        传回一个简短的错误描述。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;ASP Description&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        如果是关於ASP的错误,传回一个更详细的描述。</font></td>
      </tr>
  </table>
  </center>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">注解<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">当IIS 
  5.0遇到一个在编译或执行 
  .asp档案时产生的错误时,它就会产生一个500;100错误。在预设的状态下,所有的网站和应用程式都会把这个500;100错误传送到预设的 
  .asp档案中。在这个500;100错误产生之後,IIS也会产生描述错误状态的一个<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;ASPError&nbsp;</b></font>物件的例项。若需如何使用IIS嵌入式管理单元来改变 
  .asp档案,进而处理500;100这类错误的资讯,请参阅《Microsoft Internet Information Services 
  5.0超级管理手册—网站管理篇》第3章〈伺服器基础管理〉中的〈启用ASP错误处理〉 。</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">范例<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  下面从500-100.asp档案中摘录出的例子说明了<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;ASPError&nbsp;</b></font>物件所使用的资讯:</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">&lt;%
   Response.Write objASPError.Category 
   If objASPError.ASPCode  &gt; &quot;&quot; Then Response.Write &quot;, &quot; &amp; objASPError.ASPCode
   Response.Write &quot; (0x&quot; &amp; Hex (objASPError.Number ) &amp; &quot;)&quot; &amp; &quot;&lt;br&gt;&quot;

   Response.Write &quot;&lt;b&gt;&quot; &amp; objASPError.Description &amp; &quot;&lt;/b&gt;&lt;br&gt;&quot;
   
   If objASPError.ASPDescription  &gt; &quot;&quot; Then Response.Write 
	objASPError.ASPDescription &amp; &quot;&lt;br&gt;&quot;
   
   blnErrorWritten = False
   
  'Only show the Source if it is available and the request is from the
     same machine as IIS
   If objASPError.Source  &gt; &quot;&quot; Then
    strServername = LCase ( Request.ServerVariables (&quot;SERVER_NAME&quot;) )
    strServerIP = Request.ServerVariables ( &quot;LOCAL_ADDR&quot;)
    strRemoteIP = Request.ServerVariables (&quot;REMOTE_ADDR&quot;)
    If (strServername = &quot;localhost&quot; Or strServerIP = strRemoteIP ) And
     objASPError.File &lt;&gt; &quot;?&quot; Then
     Response.Write objASPError.File
     If objASPError.Line &gt; 0 Then Response.Write &quot;, line &quot; &amp;
	   objASPError.Line
	If objASPError.Column &gt; 0 Then Response.Write &quot;, column &quot; &amp;
	   objASPError.Column
        Response.Write &quot;&lt;br&gt;&quot;
        Response.Write &quot;&lt;font style=&quot;&quot;COLOR:000000;  FONT:8pt/11pt courier
           new&quot;&quot;&gt;&lt;b&gt;&quot;
        Response.Write Server.HTMLEncode (obj ASPError.Source ) &amp; &quot;&lt;br&gt;&quot;
        If objASPError.Column &gt; 0 Then Response.Write
           String ((objASPError.Column - 1 ), &quot;-&quot; )&amp; &quot;^&lt;br&gt;&quot;
        Response.Write&quot;&lt;/b&gt;&lt;/font&gt;&quot;
        blnErrorWritten = True
       End If 
     End If 

     If Not blnErrorWritten And objASPError.File &lt;&gt; &quot;?&quot; Then
       Response.Write &quot;&lt;b&gt;&quot;&amp; objASPError.File 
       If objASPError.Line &gt; 0 Then Response.Write &quot;, line &quot;&amp;
         obj ASPError.Line
         
     If objASPError.Column &gt; 0 Then Response.Write&quot;,column &quot;&amp;
         objASPError.Column
        Response.Write &quot;&lt;/b&gt;&lt;br&gt;&quot;
     End If 
%&gt;</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">请参阅<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;Server.GetLastError&nbsp;</b></font>。</font></p>
  <p><font face="arial" color="#3e72d7" size="4" style="line-height: 25px">
  <b style="line-height: 25px">ASPCode<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;ASPCode&nbsp;</b></font>属性会传回一个由IIS 5.0产生,包含错误代码的字串。</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">语法<br style="line-height: 25px">
 </b></font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">ASPError.ASPCode  ()</pre>
    </font>
  </div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -