Represents the base class for all XML Web service client proxies that use the HTTP transport protocol.
Assembly: System.Web.Services (in System.Web.Services.dll)
Gets or sets whether the client automatically follows server redirects.
Gets a value indicating whether the component can raise an event.(Inherited from Component.)
Gets the collection of client certificates.
Gets or sets the name of the connection group for the request.(Inherited from WebClientProtocol.)
Gets or sets the collection of cookies.
Gets or sets security credentials for XML Web service client authentication.(Inherited from WebClientProtocol.)
Gets or sets a value that indicates whether decompression is enabled for this.
Gets or sets whether pre-authentication is enabled.(Inherited from WebClientProtocol.)
Gets or sets proxy information for making an XML Web service request through a firewall.
Indicates the time an XML Web service client waits for the reply to a synchronous XML Web service request to arrive (in milliseconds).(Inherited from WebClientProtocol.)
Gets or sets a value that indicates whether connection sharing is enabled when the client uses NTLM authentication to connect to the Web server that hosts the XML Web service.
Gets or sets the base URL of the XML Web service the client is requesting.(Inherited from WebClientProtocol.)
Gets or sets the value for the user agent header that is sent with each request.
Cancels a request to an XML Web service method.(Inherited from WebClientProtocol.)
Cancels an asynchronous call to an XML Web service method, unless the call has already completed.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
Returns a response from a synchronous request to an XML Web service method.(Overrides WebClientProtocol.GetWebResponse(WebRequest).)
Returns a response from an asynchronous request to an XML Web service method.(Overrides WebClientProtocol.GetWebResponse(WebRequest, IAsyncResult).)
Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
The properties on this class are used to control the behavior of the HTTP request object used to transmit the XML Web service request and response. The properties map to properties found on HttpWebRequest.
To communicate with an XML Web service using HTTP, you must create a proxy class deriving indirectly or directly fromfor the XML Web service. Instead of creating the proxy class manually, you can use the Wsdl.exe tool to create a proxy class for a given XML Web service's service description.
Since HttpWebClientProtocol is the base class for all proxy classes, its properties are on your proxy classes. These properties are useful for controlling the request behavior of the underlying transport. For example, use the Proxy property for calling XML Web services through a firewall. Many of these properties are used to initialize the HttpWebRequest that makes the Web request.
The following example is an ASP.NET Web Form, which calls an XML Web service named Math. Within the EnterBtn_Click function, the Web Form allows the server to automatically redirect the client to other sites. It also sets client authentication credentials, proxy settings, the request encoding and the time out for the request before calling the XML Web service method.
Available since 1.1
The properties on this class are copied into a new instance of a WebRequest object for each XML Web service method call. While you can call XML Web service methods on the same WebClientProtocol instance from different threads at the same time, there is no synchronization done to ensure that a consistent snapshot of the properties gets transferred to the WebRequest object. Therefore, if you need to modify the properties and make concurrent method calls from different threads you should use a different instance of the XML Web service proxy or provide your own synchronization.