Export (0) Print
Expand All

HttpTransportBindingElement.UnsafeConnectionNtlmAuthentication Property

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.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public bool UnsafeConnectionNtlmAuthentication { get; set; }

Property Value

Type: System.Boolean
true if Unsafe Connection Sharing is enabled; otherwise, false. The default is false.

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.

NoteNote

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.

The following example sets the property to enable Unsafe Connection Sharing.

[C#]

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();
httpBinding.AuthenticationScheme = AuthenticationSchemes.Ntlm;
httpBinding.UnsafeConnectionNtlmAuthentication = true;

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft