proxy auth - still getting 407 after passing username/password

Hi,

I am having trouble access url via our proxy. I have read/tried all the examples but still nothing. However java webstart can connect.

1. proxy is Microsoft

2. base64Encoder from com.orielly.server package

here is the code:

try {

URL url = new URL("http", "someproxy", 80, "someurl");

HttpURLConnection conn = (HttpURLConnection) url.openConnection();

String proxyPassword = "DOMAIN\\username:password";

String encoded = Base64Encoder.encode(proxyPassword.getBytes());

conn.setRequestProperty("Proxy-Authorization","Basic "+encoded);

conn.connect();

System.out.print( conn.getResponseCode() );

}

catch( Exception e ) {

System.out.print( e ) ;

}

when I run this I get 407 code.

any help/pointers will be appreciated

Thanks

[846 byte] By [gusm2a] at [2007-9-29 6:20:15]
# 1
Check out this article http://www.javacoding.net/articles/technical/passproxy.html
bbrittaa at 2007-7-14 20:26:35 > top of Java-index,Archived Forums,Java Programming...
# 2
thanks, it worked great !
gusm2a at 2007-7-14 20:26:35 > top of Java-index,Archived Forums,Java Programming...