OPC Studio User's Guide and Reference
GetCredentials Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security Namespace > NetworkSecurity Class : GetCredentials Method
Returns the credentials provided by this network security.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Public Function GetCredentials() As ICredentials
'Usage
 
Dim instance As NetworkSecurity
Dim value As ICredentials
 
value = instance.GetCredentials()
[CanBeNull()]
public ICredentials GetCredentials()
[CanBeNull()]
public:
ICredentials^ GetCredentials(); 

Return Value

When IsConfigured is false, return null. Otherwise, when CustomNetworkCredential is true, return the NetworkCredential. Otherwise, returns the network credentials of the current security context.

This method can return null (Nothing in Visual Basic).

Remarks
The network security must be configured, i.e. the IsConfigured property must be true.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also