please dont rip this site
Platform SDK: IIS SDK
      [IIS 5.0] [IIS 5.1] [IIS 6.0]

Server.GetLastError

The GetLastError method returns an ASPError Object describing the error condition that occurred. This method is available only before the .asp file has sent any content to the client.

Syntax

Server.GetLastError()

Remarks

If a 500;100 custom error has been defined for an ASP application, it may refer to an .asp file. In this case, when an error occurs during the running of an .asp file within the application, the server automatically transfers to this ASP page via the Server.Transfer method. All of the state information from the executing ASP application will be available to the .asp file that is handling the error. In addition, the ASPError Object will be available, so you can expose the properties of the error through the .asp file that you set up to handle the error.

The default Web site is configured to use the file \iishelp\common\500-100.asp. You can either use this file for processing ASP errors, or create your own. If you want to change the .asp file for processing the 500;100 custom errors you can use IIS Manager.

note Note  A 500;100 custom error will be generated if IIS encounters an error while processing either an .asp file or the application's Global.asa file.

Example

The following three examples demonstrate different errors that generate a 500;100 custom error. The three types of errors are:

The following example demonstrates a preprocessing error, which IIS generates when it tries to include the file. This error will be generated because the #include statement is missing the file parameter for the #include statement.

<!--#include fil=inc.h  -->

<%

  response.write "hello"

%>

The following example demonstrates a script compiling error. The scripting engine does not compile this script because it is missing the keyword next in a For...Next loop.

<%

  dim I

  for i=1 to 1

  nxt

%>

The following example demonstrates a run-time error that occurs because the script attempts to divide by 0.

<%

  dim i,j

  dim sum

  sum=0

  j=0



  for i=1 to 10

    sum=sum+1

  next



  sum=sum/j

%>

Applies To

Server Object

See Also

Requirements

Platforms: Windows 2000 with IIS 5.0 installed, Windows XP with IIS 5.1 installed, Windows Server 2003 family with IIS 6.0 installed

Platform SDK Release: February 2003
What did you think of this topic?
Order a Platform SDK CD


file: /Techref/language/asp/OBJ/ref_vbom_seromgle.htm, 4KB, , updated: 2003/5/15 13:13, local time: 2024/11/30 01:37,
TOP NEW HELP FIND: 
18.223.195.127:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/language/asp/OBJ/ref_vbom_seromgle.htm"> Server.GetLastError</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .