PIServers.ConnectFailed Event
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
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.