Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Expose HttpWebRequest.UnsafeAuthenticatedConnectionSharing #196

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Core/EwsHttpWebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ public bool KeepAlive
set { this.request.KeepAlive = value; }
}

/// <summary>
/// Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
/// </summary>
public bool UnsafeAuthenticatedConnectionSharing
{
get { return this.request.UnsafeAuthenticatedConnectionSharing; }
set { this.request.UnsafeAuthenticatedConnectionSharing = value; }
}

/// <summary>
/// Gets or sets the name of the connection group for the request.
/// </summary>
Expand Down
21 changes: 20 additions & 1 deletion Core/ExchangeServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public abstract class ExchangeServiceBase
private string userAgent = ExchangeService.defaultUserAgent;
private bool acceptGzipEncoding = true;
private bool keepAlive = true;
private bool unsafeAuthenticatedConnectionSharing = false;
private string connectionGroupName;
private string clientRequestId;
private bool returnClientRequestId;
Expand Down Expand Up @@ -146,6 +147,7 @@ internal IEwsHttpWebRequest PrepareHttpWebRequestForUrl(
request.AllowAutoRedirect = allowAutoRedirect;
request.CookieContainer = this.CookieContainer;
request.KeepAlive = this.keepAlive;
request.UnsafeAuthenticatedConnectionSharing = this.unsafeAuthenticatedConnectionSharing ;
request.ConnectionGroupName = this.connectionGroupName;

if (acceptGzipEncoding)
Expand Down Expand Up @@ -545,6 +547,7 @@ internal ExchangeServiceBase(ExchangeServiceBase service, ExchangeVersion reques
this.userAgent = service.userAgent;
this.acceptGzipEncoding = service.acceptGzipEncoding;
this.keepAlive = service.keepAlive;
this.unsafeAuthenticatedConnectionSharing = service.unsafeAuthenticatedConnectionSharing ;
this.connectionGroupName = service.connectionGroupName;
this.timeZone = service.timeZone;
this.httpHeaders = service.httpHeaders;
Expand Down Expand Up @@ -823,6 +826,22 @@ public bool KeepAlive
}
}

/// <summary>
/// Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
/// </summary>
public bool UnsafeAuthenticatedConnectionSharing
{
get
{
return this.unsafeAuthenticatedConnectionSharing;
}

set
{
this.unsafeAuthenticatedConnectionSharing = value;
}
}

/// <summary>
/// Gets or sets the name of the connection group for the request.
/// </summary>
Expand Down Expand Up @@ -925,4 +944,4 @@ internal IEwsHttpWebRequestFactory HttpWebRequestFactory

#endregion
}
}
}
8 changes: 8 additions & 0 deletions Interfaces/IEwsHttpWebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ bool KeepAlive
get; set;
}

/// <summary>
/// Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
/// </summary>
bool UnsafeAuthenticatedConnectionSharing
{
get; set;
}

/// <summary>
/// Gets or sets the name of the connection group for the request.
/// </summary>
Expand Down