this.digestAuth = this.GetAuth(); HttpWebRequest request = (HttpWebRequest) WebRequest.Create(this.loginUrl); request.Accept = "*/*"; request.UserAgent = this.userAgent; request.Headers.Add("RETS-Version", this.version); request.ProtocolVersion = HttpVersion.Version11; request.Headers.Add("Authorization", this.digestAuth); CredentialCache cache = new CredentialCache(); cache.Add(new Uri(this.loginUrl), "Digest", new NetworkCredential(this.userName, this.password)); request.Credentials = cache; HttpWebResponse response = (HttpWebResponse) request.GetResponse();