Using the IWMSPlugin Object to Identify Errors
You can use the Status property on the IWMSPlugin interface to retrieve error information about a plug-in. This property retrieves a value from the WMS_PLUGIN_STATUS enumeration type. To determine the error state, you can use a bitwise AND of the following values.
Value |
Description |
---|---|
WMS_PLUGIN_NONE |
No status has been specified for the plug-in. |
WMS_PLUGIN_ERROR |
A plug-in error has occurred. |
WMS_PLUGIN_LOADED |
The plug-in has been loaded. |
WMS_PLUGIN_ENABLED |
The plug-in has been enabled. |
WMS_PLUGIN_LOADED_IN_PROC |
The plug-in has been loaded as an in-process object. |
WMS_PLUGIN_LOADED_OUT_OF_PROC |
The plug-in has been loaded as an out-of-process object. |
WMS_PLUGIN_REMOVE_ON_SERVICE_RESTART |
The plug-in will be removed when the server is restarted. |
When the server starts, the initial status of all plug-ins that have not been enabled is WMS_PLUGIN_NONE. If a plug-in is loaded, the server sets the status to WMS_PLUGIN_LOADED. If the plug-in cannot be loaded, the server sets its status to WMS_PLUGIN_ERROR.
When you set the Enabled property on the IWMSPlugin interface to True, the server attempts to load the plug-in, if it is not already loaded, and enable it. If the attempt is successful, the status is set to a bitwise AND of WMS_PLUGIN_LOADED and WMS_PLUGIN_ENABLED. If the plug-in fails after it has been loaded, the server sets its status to a bitwise AND of WMS_PLUGIN_LOADED and WMS_PLUGIN_ERROR. If you set the Enabled property of a loaded, error-free plug-in to False, the status is set to WMS_PLUGIN_LOADED.
If WMS_PLUGIN_ERROR is set, Status properties on the IWMSServer and IWMSPublishingPoint interfaces are changed to reflect that either a non-critical or a critical error occurred. Critical errors occur when authentication or authorization plug-ins fail and the server can no longer accept new connections or allow connected clients to make requests.
You can use the ErrorCode and ErrorText properties on the IWMSPlugin interface to retrieve additional information about an error. The ErrorCode property retrieves the HRESULT associated with the error. The ErrorText property retrieves the message, if any, sent to the Windows Event Viewer by the IWMSEventLog interface.
When you disable a plug-in that has an error condition or mark it for removal, the server clears the error flags. You cannot clear the flags while the server is running.
See Also (General)
See Also (Visual Basic .NET)
IWMSEventLogIWMSEventLog Object (Visual Basic .NET)
IWMSPluginIWMSPlugin Object (Visual Basic .NET)
IWMSPublishingPointIWMSPublishingPoint Object (Visual Basic .NET)
IWMSServerIWMSServer Object (Visual Basic .NET)
See Also (C#)
IWMSEventLogIWMSEventLog Object (C#)
IWMSPluginIWMSPlugin Object (C#)
IWMSPublishingPointIWMSPublishingPoint Object (C#)
IWMSServerIWMSServer Object (C#)
See Also (C++)
IWMSEventLogIWMSEventLog Interface
IWMSPluginIWMSPlugin Interface
IWMSPublishingPointIWMSPublishingPoint Interface
IWMSServerIWMSServer Interface