ServerState Metabase Property
Applies To: Windows Server 2003, Windows Server 2003 with SP1
The ServerState property presents the current state of the server instance. The state codes, and the corresponding states, are as follows:
1 (starting)
2 (started)
3 (stopping)
4 (stopped)
5 (pausing)
6 (paused)
7 (continuing)
Attribute Name | Attribute Value |
---|---|
XML Data Type |
DWORD |
WMI Data Type |
SINT32 |
ADSI Data Type |
DWORD |
ABO Data Type |
DWORD |
ABO Metabase Identifier |
MD_SERVER_STATE |
Attributes |
VOLATILE |
Default Value |
4 |
MetaFlagsEx |
CACHE_PROPERTY_CLEARED |
User Type |
IIS_MD_UT_SERVER |
ID |
1016 |
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 |
Bitmask Values
Constant | Value | Description |
---|---|---|
MD_SERVER_STATE_STARTING |
0x00000001 |
Server starting. |
MD_SERVER_STATE_STARTED |
0x00000002 |
Server started. |
MD_SERVER_STATE_STOPPING |
0x00000003 |
Server stopping. |
MD_SERVER_STATE_STOPPED |
0x00000004 |
Server stopped. |
MD_SERVER_STATE_PAUSING |
0x00000005 |
Server pausing. |
MD_SERVER_STATE_PAUSED |
0x00000006 |
Server paused. |
MD_SERVER_STATE_CONTINUING |
0x00000007 |
Server continuing. |
Code Example
For general code examples, see Code Examples to Configure Metabase Properties.