Keeping HTTP Basic Authentification alive while being redirected
We are using web service with basic authentication. It all worked all fine, till owners of web service implemented balancing service. Which is simply redirects requests to different instances of web service. The problem is that after being redirected basic authentication fails. There is "request authentication credentials was not passed" exception. Additional info: We have to create request manually. var req = (HttpWebRequest)WebRequest.CreateDefault(new Uri(Settings.Default.HpsmServiceAddress)); req.Headers.Add("Authorization", "Basic aaaaaaaaaaa"); req.PreAuthenticate = true; req