AllowCookies Property

HttpTransportBindingElement::AllowCookies Property

 

Gets or sets a value that indicates whether the client accepts cookies and propagates them on future requests.

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

public:
property bool AllowCookies {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if cookies are allowed; otherwise, false. The default is false.

This property is provided as a convenience for interacting with ASMX Web services that use cookies to make sure that the cookies returned from the server are automatically copied to all future client requests for that service.

The following example sets this property to indicate that all cookies from the server should be copied to future client requests.

[C#]

HttpTransportBindingElement httpBindingElement = new HttpBindingElement();
httpBindingElement.AllowCookies = true;

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Return to top
Show:
© 2016 Microsoft