Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIServers.ConnectFailed Event

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIServers.ConnectFailed Event
Occurs when the connection to a PIServer fails and not performing an auto prompt.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public event EventHandler<PIConnectFailedEventArgs> ConnectFailed
Public Event ConnectFailed As EventHandler(Of PIConnectFailedEventArgs)

Dim instance As PIServers
Dim handler As EventHandler(Of PIConnectFailedEventArgs)

AddHandler instance.ConnectFailed, handler
public:
 event EventHandler<PIConnectFailedEventArgs^>^ ConnectFailed {
	void add (EventHandler<PIConnectFailedEventArgs^>^ value);
	void remove (EventHandler<PIConnectFailedEventArgs^>^ value);
}
member ConnectFailed : IEvent<EventHandler<PIConnectFailedEventArgs>,
    PIConnectFailedEventArgs>

Value

Type: SystemEventHandlerPIConnectFailedEventArgs

Remarks

This event is raised when the connection to a PIServer fails and a prompt for login to the server is not being performed. This allows the event handler to make an explicit connection to the server and prompt for credentials using the PIServer.ConnectWithPrompt method.

Examples

For an example of how to handle events, see Event Example.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in