Name
File —
objASPError.File
Synopsis
The File property contains the full path to the file containing the error-producing code. This filename contains the full path of the file from the web root.
Parameters
None
Example
This example uses the error-generating scripts listed at the end of the Comments/Troubleshooting section. It assumes that the following code has been added to the default custom error script, 500-100.ASP:
**** BEGIN File Example Script **** <% ' This script demonstrates the use of the File ' property of the ASPError object. Dim objMyASPError Set objMyASPError = Server.GetLastError( ) Response.Write "The value of the File property is " & objMyASPError.File %> **** END File Example Script ****
When the error-generating scripts are executed, the preceding File script generates the following three responses:
Error Generating Script #1:
The value of the File property is /errorgen1.asp
Error Generating Script #2:
The value of the File property is /errorgen2.asp
Error Generating Script #3:
The value of the File property is /errorgen3.asp
Notes
Note that the file path is listed from the web server's root path, not from the root of the current application.
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.