IFPCWebProxy::ConnectCacheSize property

Applies to: desktop apps only

The ConnectCacheSize property gets or sets a value that is a factor for determining the maximum size of the connection cache.

This property is read/write.

Syntax

HRESULT put_ConnectCacheSize(
  long lCacheSize
);

HRESULT get_ConnectCacheSize(
  long *plCacheSize
);
' Data type: Long

Property ConnectCacheSize( _
  ByVal lCacheSize As long, _
  ByVal plCacheSize As long _
) As Long

Property value

A 32-bit integer that specifies a value that is a factor for determining the maximum size of the connection cache.

Error codes

These property methods return S_OK if the call is successful; otherwise, they return an error code.

Remarks

This property is read/write. Its default value is 128, and its range of permissible values is from 0 to 50,000.

The other factor that determines the maximum size of the connection cache is set internally and is based on the total physical memory and on the type and number of processors in the Forefront TMG computer. Cached connections are removed from the cache according to fixed expiration policies.

Setting this property to 0 disables connection caching. However, this degrades performance because of the need to open a new connection to the Web server for each client request and the resultant increase in the number of connections opened per second.

If clients access a Web site that uses a custom connection-based authentication method through a Forefront TMG computer and the authentication method relies on the connection between the Forefront TMG computer and the Web server, the personal data of one client may be exposed to another client. Because of connection caching, after the Web server authenticates a connection opened by the Web proxy for the first client, the Web proxy can reuse the connection for a second client, and the Web server will let the new client browse the personal data provided by the first client for authentication. This problem can be avoided by setting the ConnectCacheSize property to 0.

After the value of this property has been modified, the change must be written to persistent storage by calling the Save method, and the Microsoft Firewall service must be restarted for the change to take effect. For more information about restarting the Firewall service to apply changes, see Restarting Services After Configuration Changes.

This property cannot be accessed through Forefront TMG Management.

Examples

This VBScript script disables connection caching by setting the value of the ConnectCacheSize property to 0. This script does not include error handling.

' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim isaArray     ' An FPCArray object
Dim webProxy     ' An FPCWebProxy object
Dim restartMask  ' A 32-bit bitmask of type FpcServices
' Get references to the array object
' and the Web proxy object. 
Set isaArray = root.GetContainingArray()
Set webProxy = isaArray.ArrayPolicy.WebProxy
' Disable connection caching. 
webProxy.ConnectCacheSize = 0
restartMask = webProxy.GetServiceRestartMask
webProxy.Save
' Restart the Firewall service so that
' the change will take effect.
isaArray.RestartServices restartMask

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCWebProxy

 

 

Build date: 7/12/2010