OPC Studio User's Guide and Reference
GetCredentialByHost Method (NetworkCredential2)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Net Namespace > NetworkCredential2 Class : GetCredentialByHost Method

The value represents a DNS computer name, e.g. "domain.com", "example.microsoft.com", or "135.5.33.19". Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. Under normal conditions, host names are not empty, and they do not contain specific disallowed characters (",~:!@#$%^&'(){} ").

The value of this parameter can be null (Nothing in Visual Basic).

The value of this parameter can be null (Nothing in Visual Basic).

Syntax
'Declaration
 
Public Function GetCredentialByHost( _
   ByVal host As String, _
   ByVal port As Integer, _
   ByVal authenticationType As String _
) As NetworkCredential2
'Usage
 
Dim instance As NetworkCredential2
Dim host As String
Dim port As Integer
Dim authenticationType As String
Dim value As NetworkCredential2
 
value = instance.GetCredentialByHost(host, port, authenticationType)
public NetworkCredential2 GetCredentialByHost( 
   string host,
   int port,
   string authenticationType
)

Parameters

host

The value represents a DNS computer name, e.g. "domain.com", "example.microsoft.com", or "135.5.33.19". Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. Under normal conditions, host names are not empty, and they do not contain specific disallowed characters (",~:!@#$%^&'(){} ").

The value of this parameter can be null (Nothing in Visual Basic).

port
authenticationType

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

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

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