Specifies the level of authentication that is required for a client or server connection.
public enum AuthenticationLevel
| Member | Description |
|---|---|
| None | No authentication is performed. |
| Optional2Way | Mutual authentication is performed if the client and server support it. |
| Required | Authentication is always performed. |
The AuthenticationLevel enumeration is used to specify the level of authentication required when establishing secure network connections, such as those used by Transport Layer Security (TLS) or Secure Sockets Layer (SSL).
When you set the AuthenticationLevel property on a service, you control the authentication requirements for clients connecting to that service. Similarly, when you set it on a client, you control the authentication requirements for connecting to a service.
AuthenticationLevel.None: This is the least secure option. No authentication is performed, and connections can be established without verifying the identity of either party.AuthenticationLevel.Optional2Way: In this mode, the client and server will attempt mutual authentication if they both support it. If mutual authentication cannot be established, the connection may still proceed without it.AuthenticationLevel.Required: This is the most secure option. Authentication is mandatory. If the client and server cannot successfully authenticate each other, the connection will be refused.The specific authentication mechanisms used (e.g., certificates) depend on the underlying security protocols and configuration.
| Component | Version |
|---|---|
| .NET Framework | 4.0, 3.5, 3.0, 2.0 |
| .NET Standard | 2.0, 1.3 |
| .NET Core | 2.0, 1.1 |
| .NET | 5.0 and later |