Setup a proxy.

  • Thread starter Thread starter JoeB
  • Start date Start date
J

JoeB

Hi,,


How do i setup a global proxy setting that can be used within internet
explorer.

For example, i setup proxy, username and password etc. Then open IE and it
will connect OK.

I cannot do this - Currenly this is what i do :

WebProxy objProxy = new WebProxy( sProxy, iPort );
objProxy.BypassProxyOnLocal = true;
objProxy.Credentials = new NetworkCredential( sProxy_username,
sProxy_password, sProxy_domain );
objProxy.BypassProxyOnLocal = true;
GlobalProxySelection.Select = objProxy;


Please help



j
 
JoeB,

If you want to set the proxy parameters for the system, you do not use
the WebProxy class. Rather, you have to make a call to the InternetSetProxy
function in the wininet library through the P/Invoke layer. Specifically,
you want to use the INTERNET_OPTION_PROXY option.

Hope this helps.
 
Thanks for that. Does anyone have an example of this that works?




Joe




Nicholas Paldino said:
JoeB,

If you want to set the proxy parameters for the system, you do not use
the WebProxy class. Rather, you have to make a call to the
InternetSetProxy function in the wininet library through the P/Invoke
layer. Specifically, you want to use the INTERNET_OPTION_PROXY option.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

JoeB said:
Hi,,


How do i setup a global proxy setting that can be used within internet
explorer.

For example, i setup proxy, username and password etc. Then open IE and
it will connect OK.

I cannot do this - Currenly this is what i do :

WebProxy objProxy = new WebProxy( sProxy, iPort );
objProxy.BypassProxyOnLocal = true;
objProxy.Credentials = new NetworkCredential( sProxy_username,
sProxy_password, sProxy_domain );
objProxy.BypassProxyOnLocal = true;
GlobalProxySelection.Select = objProxy;


Please help



j
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top