You can get NTCredentials to set both types of authentication credentials 
tegether.

To set credentials for connecting to ur server, try something like this:
NTCredentials credentials = new NTCredentials(username, password, hostName, 
domain);
httpClient.getState().setCredentials(null, null, credentials);

To set auth credentials to connect to proxy server, try seomthing like this:
NTCredentials proxyCredentials = new NTCredentials(proxyusername, 
proxypassword, hostName, proxydomain);
httpClient.getState().setProxyCredentials(null, null, proxyCredentials);

Hope that helps,
--Satish



On 6/29/05, David Parks <[EMAIL PROTECTED]> wrote:
> 
> Hi all,
> I am trying to authenticate to a server via a proxy which also requires 
> authentication. It seems that I can get either the proxy authentication to 
> work OR the site authentication to work, but not both.
> 
> Both seem to work independently when I set the credentials (or proxy 
> credentials) using NTCredentials (e.g. if I connect to the site from a 
> network not using a proxy I can get it to work, and I can authenticate to 
> the proxy only to get a 401 authentication failed from the server when using 
> the proxy).
> 
> I read in the Authentication tutorial that you can't authenticate using 
> NTLM to both the proxy and site, so I'm trying various combinations of 
> authentication, but I can't find any documentation that specifically covers 
> this case and I feel like I'm just taking stabs in the dark right now.
> 
> If anyone can point me in the direction of the light at the end of the 
> tunnel I'd really appreciate it.
> 
> Thanks,
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to