ServerManagerException.ErrorCode Property

Definition

Gets the error code that indicates the cause of the exception.

public:
 property int ErrorCode { int get(); };
public int ErrorCode { get; }
member this.ErrorCode : int
Public ReadOnly Property ErrorCode As Integer

Property Value

An error code that indicates the cause of the exception.

Remarks

The following table lists the valid error codes for the ErrorCode property when IIS 7 throws the exception.

Error code Description
100 The Windows Process Activation Service was not started.
101 The World Wide Web Publishing Service (WWW service) was not started.
102 A requested port is already being used.

When you throw the exception from your code, you can provide any error code you want.

Applies to