Прочетете на английски Редактиране

Споделяне чрез


LdapException Constructors

Definition

The LdapException() constructor creates an instance of the LdapException class.

Overloads

LdapException()

The LdapException() constructor creates an instance of the LdapException class.

LdapException(Int32)

The LdapException(Int32) constructor creates an instance of the LdapException class using the specified error code. The default message displayed to the client is "Communications error with the LDAP server".

LdapException(String)

The LdapException(String) constructor creates an instance of the LdapException class using the specified message.

LdapException(Int32, String)

The LdapException(Int32, String) constructor creates an instance of the LdapException class using the specified error code and message.

LdapException(SerializationInfo, StreamingContext)
Obsolete.

The LdapException(SerializationInfo, StreamingContext) constructor creates an instance of the LdapException class using the specified serialization data and streaming context.

LdapException(String, Exception)

The LdapException(String, Exception) constructor creates an instance of the LdapException class using the specified message and inner exception.

LdapException(Int32, String, Exception)

The LdapException(Int32, String, Exception) constructor creates an instance of the LdapException class using the specified error code, message, and inner exception.

LdapException(Int32, String, String)

The LdapException(Int32, String, String) constructor creates an instance of the LdapException class using the specified error code, message, and LDAP server error message.

LdapException()

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException() constructor creates an instance of the LdapException class.

C#
public LdapException();

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(Int32)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(Int32) constructor creates an instance of the LdapException class using the specified error code. The default message displayed to the client is "Communications error with the LDAP server".

C#
public LdapException(int errorCode);

Parameters

errorCode
Int32

The error code returned by the LDAP implementation.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(String)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(String) constructor creates an instance of the LdapException class using the specified message.

C#
public LdapException(string message);

Parameters

message
String

The message displayed to the client when the exception occurs.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(Int32, String)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(Int32, String) constructor creates an instance of the LdapException class using the specified error code and message.

C#
public LdapException(int errorCode, string message);

Parameters

errorCode
Int32

The error code returned by the LDAP implementation.

message
String

The message displayed to the client when the exception occurs.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(SerializationInfo, StreamingContext)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

The LdapException(SerializationInfo, StreamingContext) constructor creates an instance of the LdapException class using the specified serialization data and streaming context.

C#
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected LdapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
C#
protected LdapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

Data required to serialize the parameter.

context
StreamingContext

The source and destination of the serialized stream associated with the parameter.

Attributes

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии (остаряло)
.NET (8 (package-provided), 9 (package-provided), 10 (package-provided))
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(String, Exception)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(String, Exception) constructor creates an instance of the LdapException class using the specified message and inner exception.

C#
public LdapException(string message, Exception inner);

Parameters

message
String

The message displayed to the client when the exception occurs.

inner
Exception

The inner exception, if any, that threw the exception.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(Int32, String, Exception)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(Int32, String, Exception) constructor creates an instance of the LdapException class using the specified error code, message, and inner exception.

C#
public LdapException(int errorCode, string message, Exception inner);

Parameters

errorCode
Int32

The error code returned by the LDAP implementation.

message
String

The message displayed to the client when the exception occurs.

inner
Exception

The inner exception, if any, that threw the exception.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

LdapException(Int32, String, String)

Source:
LdapException.cs
Source:
LdapException.cs
Source:
LdapException.cs

The LdapException(Int32, String, String) constructor creates an instance of the LdapException class using the specified error code, message, and LDAP server error message.

C#
public LdapException(int errorCode, string message, string serverErrorMessage);

Parameters

errorCode
Int32

The error code returned by the LDAP implementation.

message
String

The message displayed to the client when the exception occurs.

serverErrorMessage
String

The LDAP server error message.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)