473,378 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to spawn IE with a proxy address

I am trying to figure out how to create a Process that spawns IE with a
specific proxy (web-proxy:8080). Does anyone know how to do this?
--
-----------
Thanks,
Steve
May 31 '07 #1
6 1983
Hi Steve,

Based on my understanding, the proxy of the IE process is shared by all
instances of it and it's stored in registry, which is changed by IE's
control panel applet.

Therefore I think unless you're hosting a web browser control in your
program, you will have to change the shared (global) settings to make
spawned IE process to use the proxy server.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 1 '07 #2
I agree with you comment but how do I change the global settings
programmatically?
--
-----------
Thanks,
Steve
"Walter Wang [MSFT]" wrote:
Hi Steve,

Based on my understanding, the proxy of the IE process is shared by all
instances of it and it's stored in registry, which is changed by IE's
control panel applet.

Therefore I think unless you're hosting a web browser control in your
program, you will have to change the shared (global) settings to make
spawned IE process to use the proxy server.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 1 '07 #3
You can do this by making calls through the WinInet API (through the
P/Invoke layer). There are a number of functions in there which will allow
you to change the proxy settings for IE.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SteveT" <St****@newsgroups.nospamwrote in message
news:13**********************************@microsof t.com...
>I agree with you comment but how do I change the global settings
programmatically?
--
-----------
Thanks,
Steve
"Walter Wang [MSFT]" wrote:
>Hi Steve,

Based on my understanding, the proxy of the IE process is shared by all
instances of it and it's stored in registry, which is changed by IE's
control panel applet.

Therefore I think unless you're hosting a web browser control in your
program, you will have to change the shared (global) settings to make
spawned IE process to use the proxy server.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

================================================= =
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================= =

This posting is provided "AS IS" with no warranties, and confers no
rights.


Jun 1 '07 #4
Thanks. I used the Registry class. It is now working. :)
--
-----------
Thanks,
Steve
"Nicholas Paldino [.NET/C# MVP]" wrote:
You can do this by making calls through the WinInet API (through the
P/Invoke layer). There are a number of functions in there which will allow
you to change the proxy settings for IE.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SteveT" <St****@newsgroups.nospamwrote in message
news:13**********************************@microsof t.com...
I agree with you comment but how do I change the global settings
programmatically?
--
-----------
Thanks,
Steve
"Walter Wang [MSFT]" wrote:
Hi Steve,

Based on my understanding, the proxy of the IE process is shared by all
instances of it and it's stored in registry, which is changed by IE's
control panel applet.

Therefore I think unless you're hosting a web browser control in your
program, you will have to change the shared (global) settings to make
spawned IE process to use the proxy server.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.



Jun 1 '07 #5
Which is exactly the wrong way to go about doing this.

You should be calling the InternetSetOption API function with an option
of INTERNET_OPTION_PROXY.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"SteveT" <St****@newsgroups.nospamwrote in message
news:96**********************************@microsof t.com...
Thanks. I used the Registry class. It is now working. :)
--
-----------
Thanks,
Steve
"Nicholas Paldino [.NET/C# MVP]" wrote:
> You can do this by making calls through the WinInet API (through the
P/Invoke layer). There are a number of functions in there which will
allow
you to change the proxy settings for IE.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SteveT" <St****@newsgroups.nospamwrote in message
news:13**********************************@microso ft.com...
>I agree with you comment but how do I change the global settings
programmatically?
--
-----------
Thanks,
Steve
"Walter Wang [MSFT]" wrote:

Hi Steve,

Based on my understanding, the proxy of the IE process is shared by
all
instances of it and it's stored in registry, which is changed by IE's
control panel applet.

Therefore I think unless you're hosting a web browser control in your
program, you will have to change the shared (global) settings to make
spawned IE process to use the proxy server.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

================================================= =
When responding to posts, please "Reply to Group" via your newsreader
so
that others may learn and benefit from your issue.
================================================= =

This posting is provided "AS IS" with no warranties, and confers no
rights.




Jun 1 '07 #6
I agree with Nicholas here that setting the proxy via registry directly is
not the supported way, it will also requires you to restart existing IE
processes to use the new settings.

The supported way is to use InternetSetOption as following KB suggested:

#How to programmatically query and set proxy settings under Internet
Explorer
http://support.microsoft.com/kb/226473

However, I haven't found any existing managed code to do this. You may need
to use C/C++ to create wrapper DLL and call it from managed code using
P/Invoke.

Let me know if there's anything else I can help.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 4 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fuzzyman | last post by:
In a nutshell - the question I'm asking is, how do I make a socket conenction go via a proxy server ? All our internet traffic has to go through a proxy-server at location 'dav-serv:8080' and I...
1
by: Imran Aziz | last post by:
Hello All, I am using HttpWebRequest to fetch webpages in my ASP.net C# application. The request works fine without the proxy, but on using the code from within a network that uses proxy the...
0
by: Maroller | last post by:
I have a WiFi network comprising a Netgear router, a desktop and a laptop. An ASP web service is set up on the desktop IIS. But when I try to add a web reference to an ASP web application developed...
0
by: kgoods | last post by:
Hope someone has some ideas on this one because I'm fresh out! :) I have a SQL server on our internal network behind a linux firewall and Proxy server 2.0 (WinNT 4.0). It is the backend for an...
6
by: Alejandro Dubrovsky | last post by:
I see from googling around that this is a popular topic, but I haven't seen anyone saying "ah, yes, that works", so here it goes. How does one connect through a proxy which requires basic...
7
by: Pro1712 | last post by:
Hello, I need to write a simple proxy server. What I want to do is to use HttpListener to get requests from the browser, add some proxy information and some other stuff and send the request to...
0
by: deepak | last post by:
Hi All, i m develpoing a .net Window application which has 4 texboxes(tbxURLmfor URL in URL Frame,tbxAddress for address in Proxy server frame,tbxPort for port in proxy server...
0
by: Maxx57 | last post by:
C# VS.Net 1.1 (2003) - trouble with using IE proxy server settings I've got a program that detects if it can connect to a webservice. It sends a System.Net.WebRequest and then checks the...
2
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.