EventLogSession Constructors

Definition

Initializes a new EventLogSession object.

Overloads

EventLogSession()

Initializes a new EventLogSession object, establishes a connection with the local Event Log service.

EventLogSession(String)

Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. The credentials (user name and password) of the user who calls the method is used for the credentials to access the remote computer.

EventLogSession(String, String, String, SecureString, SessionAuthentication)

Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. The specified credentials (user name and password) are used for the credentials to access the remote computer.

EventLogSession()

Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs

Initializes a new EventLogSession object, establishes a connection with the local Event Log service.

C#
public EventLogSession();
C#
[System.Security.SecurityCritical]
public EventLogSession();
Attributes

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

EventLogSession(String)

Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs

Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. The credentials (user name and password) of the user who calls the method is used for the credentials to access the remote computer.

C#
public EventLogSession(string server);

Parameters

server
String

The name of the computer on which to connect to the Event Log service.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

EventLogSession(String, String, String, SecureString, SessionAuthentication)

Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs

Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. The specified credentials (user name and password) are used for the credentials to access the remote computer.

C#
public EventLogSession(string server, string domain, string user, System.Security.SecureString password, System.Diagnostics.Eventing.Reader.SessionAuthentication logOnType);
C#
[System.Security.SecurityCritical]
public EventLogSession(string server, string domain, string user, System.Security.SecureString password, System.Diagnostics.Eventing.Reader.SessionAuthentication logOnType);

Parameters

server
String

The name of the computer on which to connect to the Event Log service.

domain
String

The domain of the specified user.

user
String

The user name used to connect to the remote computer.

password
SecureString

The password used to connect to the remote computer.

logOnType
SessionAuthentication

The type of connection to use for the connection to the remote computer.

Attributes

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10