Since you have different servers that are requiring same credentials, you
should use the CredentialCache, instead of NetworkCredential on the request.
This is how you do it:
CredentialCache cache = new CredentialCache();
cache.Add(new Uri(
http://server1/path1), "digest", new
NetworkCredential("user1", "pass1", "dom1"));
cache.Add(new Uri(
http://server2/path2), "digest", new
NetworkCredential("user1", "pass1", "dom1"));
req.Credentials = cache;
Now, the webrequest will know that there is a credential for the second
server, and will use those for the second request. Just change the above
lines to suit your needs.
==========================
This posting is provided as-is. It does not offer any warranties and confers
no rights.
"John Saunders" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Nick Jacobsen" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Yes, that works, but creating a new connection for each redirect
> drastically
> > slows things down... I was hoping for either a fix for this, or for
this
> to
> > be confirmed as a bug... or for an explination of the reason it behaves
> > this way, since IE handles it fine...
>
> Wasn't it going to use two connections anyway? One per server?
>
> If it starts using more than the two, please post the info here. It's
> looking like I'm going to need to do the same thing soon.
> --
> John Saunders
> Internet Engineer
> (E-Mail Removed)
>
>