Compartilhar via


ServerState

The ServerState property presents the current state of the server instance.

The states have friendly identifiers defined in the IIScnfg.h header file, and are as follows:

Value

Meaning

Friendly ID

1

Starting

MD_SERVER_STATE_STARTING

2

Started

MD_SERVER_STATE_STARTED

3

Stopping

MD_SERVER_STATE_STOPPING

4

Stopped

MD_SERVER_STATE_STOPPED

5

Pausing

MD_SERVER_STATE_PAUSING

6

Paused

MD_SERVER_STATE_PAUSED

7

Continuing

MD_SERVER_STATE_CONTINUING

Note

This property reflects the state of the IIS server and should be treated as read-only. When configuring the metabase with Admin Base Object (ABO), use the MD_SERVER_COMMAND property to send start, stop, and pause commands to the server. When using ADSI or WMI, use the methods of the IIsFtpServer and IIsWebServer objects. You can also use the methods of the IIisServiceControl interface to control the server in a compiled IIS application.

Schema Attributes

Attribute Name

Value

ADSI/WMI Data Type

DWORD

ABO Data Type

DWORD_METADATA

Schema Default

4

Internal Default

Not specified.

Upper Bound

Not specified

Lower Bound

Not specified

Internal ID

1016

Friendly ID

MD_SERVER_STATE

Property Attributes

VOLATILE

User Type

IIS_MD_UT_SERVER

Configurable Locations

You can configure this property at the following locations in the IIS metabase.

Metabase Path

IIS Admin Object Type

/LM/W3SVC/n

IIsWebServer

/LM/MSFTPSVC/n

IIsFtpServer

/LM/NNTPSVC/n

IIsNntpServer

/LM/SMTPSVC/n

IIsSmtpServer

Flags

There are no flags for this property.

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

See Also