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.aspError Generating Script #2:
The value of the File property is /errorgen2.aspError Generating Script #3:
The value of the File property is /errorgen3.aspNotes
Note that the file path is listed from the web server's root path, not from the root of the current application.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access