Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FtpWebRequest.ConnectionGroupName Property

Gets or sets the name of the connection group that contains the service point used to send the current request.

Namespace:  System.Net
Assembly:  System (in System.dll)
'Declaration
Public Overrides Property ConnectionGroupName As String

Property Value

Type: System.String
A String value that contains a connection group name.
ExceptionCondition
InvalidOperationException

A new value was specified for this property for a request that is already in progress.

Connection groups associate a set of requests with a particular connection or set of connections. The connections in a connection group can be reused only by requests originating in the same application domain, when the credentials on the request are the same and the request specifies the connection group name. When a request does not specify a connection group name, any existing connection to the requested server that is not associated with a connection group can be used. When the credentials are not the same, the existing connection is closed and the new request must be reauthenticated.

Using connection groups can improve performance because this allows all of the requests for a user to reuse the connection authenticated with the user's credentials.

Changing the ConnectionGroupName property after calling the GetRequestStream, BeginGetRequestStream, GetResponse, or BeginGetResponse method causes an InvalidOperationException exception.

The following code example retrieves the value of this property.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.