HttpTransportBindingElement.UnsafeConnectionNtlmAuthentication Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether Unsafe Connection Sharing is enabled on the server. If enabled, NTLM authentication is performed once on each TCP connection.
public:
property bool UnsafeConnectionNtlmAuthentication { bool get(); void set(bool value); };
public bool UnsafeConnectionNtlmAuthentication { get; set; }
member this.UnsafeConnectionNtlmAuthentication : bool with get, set
Public Property UnsafeConnectionNtlmAuthentication As Boolean
Property Value
true
if Unsafe Connection Sharing is enabled; otherwise, false
. The default is false
.
Examples
The following example sets the property to enable Unsafe Connection Sharing.
HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();
httpBinding.AuthenticationScheme = AuthenticationSchemes.Ntlm;
httpBinding.UnsafeConnectionNtlmAuthentication = true;
Remarks
When this property is set to true
and the first request over a particular connection is authenticated using NTLM, subsequent requests over the same connection are processed using the authentication information in IIdentity of the initial request.
This property has no effect when NTLM is not the authentication protocol.
Note
While setting this property to true
increases performance because additional NTLM authentication challenges are not sent, there is a security risk in not requiring all requests to provide authentication information. You must determine whether the increase in performance is worth this risk.
For more information, see UnsafeConnectionNtlmAuthentication.