Josh Bauer

Josh Bauer

  • NA
  • 6
  • 0

Launch Internet Explorer with Proxy Credentials

Mar 16 2009 7:47 PM
Hello Everyone,

I'm working on a project at the moment which I thought was going to be fairly simple. However it's turned out to be quite a complicated saga!

All I want to do is launch Internet Explorer with proxy username and password already set so the user doesn't have to type it in and click enter.

Basically we run behind a proxy server control by a third party company. We sync our AD with their Unix controlled proxy so the usernames and password are the same, though I'm not too sure how the authentication works with IE, but I know the unix system is not based on the same system as IIS or Active Directory and so doesn't check the username with the Logon details.

So my idea was to call the current Windows Username and Password and pass it to Internet Explorer using WebProxy and then using Process.Start to launch it.

// instanciate the webproxy class, passing the domain and port number of proxy server
WebProxy myProxy = new WebProxy("http://10.18.16.1:3129", true);
// pass the webproxy the users proxy user name and password
myProxy.Credentials = new NetworkCredential("username", "password");
// select webproxy as the one to use
GlobalProxySelection.Select = myProxy;
Process.Start("IExplore.exe","http://www.yahoo.com");

I've also tried overloading the Process.Start with Username Password and Domain, however that doesn't seem to work either. (Unless I got that wrong)

Hope you can help.

Josh B

Answers (1)