Edit

Share via


WindowsAuthenticationElement.DefaultCredentialsHandleCacheSize Property

Definition

Defines the default size of the Windows credential handle cache.

public:
 property int DefaultCredentialsHandleCacheSize { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("defaultCredentialsHandleCacheSize", DefaultValue=0)]
public int DefaultCredentialsHandleCacheSize { get; set; }
[<System.Configuration.ConfigurationProperty("defaultCredentialsHandleCacheSize", DefaultValue=0)>]
member this.DefaultCredentialsHandleCacheSize : int with get, set
Public Property DefaultCredentialsHandleCacheSize As Integer

Property Value

The default size of the Windows credential handle cache.

Attributes

Remarks

By default, the value of defaultCredentialsHandleCacheSize is 0. This causes Windows to allocate a separate SSPI handle for each HttpWebRequest.

<system.net>
  <settings>
    <windowsAuthentication defaultCredentialsHandleCacheSize="0" />
  </settings>
</system.net>

If this behavior impacts performance, set DefaultCredentialsHandleCacheSize to a value greater than 0 to use a single, cached SSPI credential handle for default network credentials. The exact value depends on application requirements. Generally, a value between 50 and 100 works for most high-performant applications.

Applies to