Beispiel #1
0
 /// <summary>
 /// Initialize the web service proxy stub.
 /// </summary>
 /// <param name="request">The client proxy to initialize</param>
 /// <param name="domainID">The identifier for the domain.</param>
 public void InitializeWebClient(HttpWebClientProtocol request, string domainID)
 {
     request.UserAgent       = userAgent;
     request.Credentials     = credentials;
     request.CookieContainer = cookieHash[domainID] as CookieContainer;
     request.Proxy           = ProxyState.GetProxyState(new Uri(request.Url));
     request.PreAuthenticate = true;
 }
Beispiel #2
0
 /// <summary>
 /// Initialize the HttpWebRequest.
 /// </summary>
 /// <param name="request">The request to initialize.</param>
 /// <param name="domainID">The identifier for the domain.</param>
 public void InitializeWebRequest(HttpWebRequest request, string domainID)
 {
     //request.KeepAlive = false;
     request.UserAgent       = userAgent;
     request.Credentials     = credentials;
     request.CookieContainer = cookieHash[domainID] as CookieContainer;
     request.Proxy           = ProxyState.GetProxyState(request.RequestUri);
     request.PreAuthenticate = true;
 }