PollingDuplexHttpBinding Constructor


Initializes a new instance of the PollingDuplexHttpBinding class.

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

public PollingDuplexHttpBinding()

This is the default constructor for this duplex binding and it uses the default values for the security and polling modes. The default value used for the PollingDuplexHttpSecurityMode is None, which specifies that the SOAP message is not secured and the client is not authenticated. The default value used for the PollingDuplexMode is SingleMessagesPerPoll(), which indicates that the server will return one message every time the client polls for a message and then close the polling connection. To create instances of the PollingDuplexHttpBinding class with non-default values for these modes, use the PollingDuplexHttpBinding(PollingDuplexHttpSecurityMode, PollingDuplexMode) constructor.

//Inactivity timeout
PollingDuplexHttpBinding binding = new PollingDuplexHttpBinding();

//Get default inactivity timeout
TimeSpan defaultInactivityTimeOut = binding.InactivityTimeout;
//Returns default timeout in minutes: 10
string txtDefaultInactivityTimeOut = defaultInactivityTimeOut.Minutes.ToString();

//Set new inactivity timeout
TimeSpan newInactivityTimeOut = new TimeSpan(0, 5, 0);
binding.InactivityTimeout = newInactivityTimeOut;
//Returns new timeout in minutes: 5
string txtNewInactivityTimeOut = binding.InactivityTimeout.Minutes.ToString();


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions