Basic Authentication over redirection
问题 I have a webservice that needs a Basic Authentication header. However, when I call it using var header = "Authorization: Basic " + CreateBasicHttpAuthenticationHeader(login, password); webRequest.Headers.Add(header); var webResponse = (HttpWebResponse)webRequest.GetResponse(); It returns a 303 - See Other: POST https://myservice/rates HTTP/1.1 Authorization: Basic QXZ...NjY= Content-Type: application/x-content X-API-Version: 1.1 If-Unmodified-Since: Mon, 23 Sep 2013 08:32:27 GMT User-Agent: