FYI,
I think I've managed to solve the issue;
I'm using an impersonation context, and I use the CredentialCache.DefaultNetworkCredentials
, and I set the WebClient
's UseDefaultCredentials
to true, and this seems to be working so far.
So:
WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent();
using (identity.Impersonate())
{
webClient.Credentials = CredentialCache.DefaultNetworkCredentials;
webClient.UseDefaultCredentials = true;
}
This worked for me.