Partager via


Server Object (IIS)

You can use the Server object to access methods and properties on the server. Most of these methods and properties serve as utility functions.

Methods

The Server object defines the following methods.

Method

Description

Server.CreateObject

Creates an instance of a server component.

Server.Execute

Executes an .asp file.

Server.GetLastError

Returns an ASPError object that describes the error condition.

Server.HTMLEncode

Applies HTML encoding to the specified string.

Server.MapPath

Maps the specified virtual path, either the absolute path on the current server or the path relative to the current page, into a physical path.

Server.Transfer

Sends all of the current state information to another .asp file for processing.

Server.URLEncode

Applies URL encoding rules, including escape characters, to the string.

Properties

The Server object defines the following property.

Property

Description

Server.ScriptTimeout

The amount of time that a script can run before it times out.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS