473,725 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to avoid Internet Explorer proxy settings causing Remoting problem?

Hi,

I have a program that runs on multiple client pc's. Occasionally one or more
of those pc's use VPN to connect to another corporate network. When using
VPN they need to set proxy server in Internet Explorer connection settings
(proxy:8080). However, as soon as this setting is enabled, the remoting
program running on their pc stops communicating with the server it sends
data to. I've disabled proxy setting on the affected pc, rebooted and my
program commnicates with the server ok. So it appears to be the proxy
setting.

My questions are:

1) Can I do anything in my program to avoid Internet Explorer proxy setting
impacting on my program. Can I somehow have my program ignore this setting?

2) Why does internet explorer setting cause problem with my program? I guess
it must be system wide setting but just happens to be set in IE..well maybe
I answer my own question here or is this incorrect? Is there .NET Framework
network settings?

Thanks
Harry

Jul 21 '05 #1
6 7930
Hi,

I assume that your program is using HTTP channels for remoting. Please,
tell more about when this problem happens. If after the program is
started, and you change the settings in IE? How does it stops? Do you
use callbacks/events? What happens if you make the connection, setup the
proxy in IE, and then start your program? Does that proxy need
authentication?

Sunny
In article <#a************ **@TK2MSFTNGP12 .phx.gbl>, harry@nospam says...
Hi,

I have a program that runs on multiple client pc's. Occasionally one or more
of those pc's use VPN to connect to another corporate network. When using
VPN they need to set proxy server in Internet Explorer connection settings
(proxy:8080). However, as soon as this setting is enabled, the remoting
program running on their pc stops communicating with the server it sends
data to. I've disabled proxy setting on the affected pc, rebooted and my
program commnicates with the server ok. So it appears to be the proxy
setting.

My questions are:

1) Can I do anything in my program to avoid Internet Explorer proxy setting
impacting on my program. Can I somehow have my program ignore this setting?

2) Why does internet explorer setting cause problem with my program? I guess
it must be system wide setting but just happens to be set in IE..well maybe
I answer my own question here or is this incorrect? Is there .NET Framework
network settings?

Thanks
Harry

Jul 21 '05 #2

Yes. Using HTTP channel.

If my program is started while the proxy setting is disabled, there is no
problem.

If my program is running, and the proxy setting is enabled (or enabled then
disabled) still no problem with my program.

However, if my program is started / restarted when the proxy setting is
enabled then my program hangs when trying to communicate with the server. I
guess because it is expecting proxy however no proxy server exists on local
network.

If my program was started when proxy setting was enabled, then proxy setting
is disabled, my program still has problems communicating with server - I
guess it still tries to use proxy server.

I guess my only option is to temporarily disable proxy server (if enabled)
prior to creating HTTP channel. Can I do this from VB.NET?

Thanks
Harry
"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:ea******** ******@tk2msftn gp13.phx.gbl...
Hi,

I assume that your program is using HTTP channels for remoting. Please,
tell more about when this problem happens. If after the program is
started, and you change the settings in IE? How does it stops? Do you
use callbacks/events? What happens if you make the connection, setup the
proxy in IE, and then start your program? Does that proxy need
authentication?

Sunny
In article <#a************ **@TK2MSFTNGP12 .phx.gbl>, harry@nospam says...
Hi,

I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in Internet Explorer connection settings (proxy:8080). However, as soon as this setting is enabled, the remoting
program running on their pc stops communicating with the server it sends
data to. I've disabled proxy setting on the affected pc, rebooted and my
program commnicates with the server ok. So it appears to be the proxy
setting.

My questions are:

1) Can I do anything in my program to avoid Internet Explorer proxy setting impacting on my program. Can I somehow have my program ignore this setting?
2) Why does internet explorer setting cause problem with my program? I guess it must be system wide setting but just happens to be set in IE..well maybe I answer my own question here or is this incorrect? Is there .NET Framework network settings?

Thanks
Harry

Jul 21 '05 #3
Hi,

In article <uu************ **@TK2MSFTNGP11 .phx.gbl>, harry@nospam says...

If my program is started while the proxy setting is disabled, there is no
problem.

If my program is running, and the proxy setting is enabled (or enabled then
disabled) still no problem with my program.

However, if my program is started / restarted when the proxy setting is
enabled then my program hangs when trying to communicate with the server. I
guess because it is expecting proxy however no proxy server exists on local
network.

If my program was started when proxy setting was enabled, then proxy setting
is disabled, my program still has problems communicating with server - I
guess it still tries to use proxy server.
The remoting infrastructure reads the proxy settings when channel is
registered. That explains what you see. When you start your program
without proxy set in IE, it registers a channel without using proxy. And
even if you enable it later, it does not affect already registered
channel. The same is whit when you start your program with proxy
settings enabled.

I guess my only option is to temporarily disable proxy server (if enabled)
prior to creating HTTP channel. Can I do this from VB.NET?


It can be done. But what if your client needs a proxy to connect? I
would put some option for this, so the user can decide if he/she needs
the proxy settings to be used.

If you want to disable the use of the IE settings, you have to put this
before the channel registration:

GlobalProxySele ction.Select = GlobalProxySele ction.GetEmptyW ebProxy();

Hope that helps
Sunny
Jul 21 '05 #4
Thanks Sunny. I tried that however unfortunately the same problem still
exists. Have you any other sugestions, or is my code incorrect?

This code is called when loading the form:

Private Sub CreateServerCha nnel()
m_DataManager = New DataManager(Me)

System.Net.Glob alProxySelectio n.Select =
System.Net.Glob alProxySelectio n.GetEmptyWebPr oxy
Dim chnl As New HttpChannel(333 3)
ChannelServices .RegisterChanne l(chnl)

RemotingService s.Marshal(m_Dat aManager, "DataManager.so ap")

End Sub

Thanks
Harry

"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:Ox******** **********@tk2m sftngp13.phx.gb l...
Hi,

In article <uu************ **@TK2MSFTNGP11 .phx.gbl>, harry@nospam says...

If my program is started while the proxy setting is disabled, there is no problem.

If my program is running, and the proxy setting is enabled (or enabled then disabled) still no problem with my program.

However, if my program is started / restarted when the proxy setting is
enabled then my program hangs when trying to communicate with the server. I guess because it is expecting proxy however no proxy server exists on local network.

If my program was started when proxy setting was enabled, then proxy setting is disabled, my program still has problems communicating with server - I
guess it still tries to use proxy server.


The remoting infrastructure reads the proxy settings when channel is
registered. That explains what you see. When you start your program
without proxy set in IE, it registers a channel without using proxy. And
even if you enable it later, it does not affect already registered
channel. The same is whit when you start your program with proxy
settings enabled.

I guess my only option is to temporarily disable proxy server (if enabled) prior to creating HTTP channel. Can I do this from VB.NET?


It can be done. But what if your client needs a proxy to connect? I
would put some option for this, so the user can decide if he/she needs
the proxy settings to be used.

If you want to disable the use of the IE settings, you have to put this
before the channel registration:

GlobalProxySele ction.Select = GlobalProxySele ction.GetEmptyW ebProxy();

Hope that helps
Sunny

Jul 21 '05 #5
Hi,
what exception you receive?
Is this a server code?

This code should avoid using of any proxy.

Your problem may be somewhere else. Can you try to explain the exact
configuration, in which you see and don't see the problem?

Sunny

In article <#Q************ **@TK2MSFTNGP09 .phx.gbl>, harry@nospam says...
Thanks Sunny. I tried that however unfortunately the same problem still
exists. Have you any other sugestions, or is my code incorrect?

This code is called when loading the form:

Private Sub CreateServerCha nnel()
m_DataManager = New DataManager(Me)

System.Net.Glob alProxySelectio n.Select =
System.Net.Glob alProxySelectio n.GetEmptyWebPr oxy
Dim chnl As New HttpChannel(333 3)
ChannelServices .RegisterChanne l(chnl)

RemotingService s.Marshal(m_Dat aManager, "DataManager.so ap")

End Sub

Thanks
Harry

"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:Ox******** **********@tk2m sftngp13.phx.gb l...
Hi,

In article <uu************ **@TK2MSFTNGP11 .phx.gbl>, harry@nospam says...

If my program is started while the proxy setting is disabled, there is no problem.

If my program is running, and the proxy setting is enabled (or enabled then disabled) still no problem with my program.

However, if my program is started / restarted when the proxy setting is
enabled then my program hangs when trying to communicate with the server. I guess because it is expecting proxy however no proxy server exists on local network.

If my program was started when proxy setting was enabled, then proxy setting is disabled, my program still has problems communicating with server - I
guess it still tries to use proxy server.


The remoting infrastructure reads the proxy settings when channel is
registered. That explains what you see. When you start your program
without proxy set in IE, it registers a channel without using proxy. And
even if you enable it later, it does not affect already registered
channel. The same is whit when you start your program with proxy
settings enabled.

I guess my only option is to temporarily disable proxy server (if enabled) prior to creating HTTP channel. Can I do this from VB.NET?


It can be done. But what if your client needs a proxy to connect? I
would put some option for this, so the user can decide if he/she needs
the proxy settings to be used.

If you want to disable the use of the IE settings, you have to put this
before the channel registration:

GlobalProxySele ction.Select = GlobalProxySele ction.GetEmptyW ebProxy();

Hope that helps
Sunny


Jul 21 '05 #6
Hi,

I'm very new to, and know very little about remoting. So my explanations may
not have all the correct remoting terminology.

The client PC is a Windows XP pc with up to date patches, with .NET
Framework Ver 1.1 (I use VS.NET 2002 for development). I also
tested on another XP machine, and also a Win2000 machine. These also have
exactly the same problem only occuring when proxy setting is enabled. I
included the code you gave me when testing on the other pc's.

There is no exception raised. The code simply stops/hangs, even though I
have a timeout:
///
Dim prop As IDictionary = ChannelServices .GetChannelSink Properties(Mana ger)
prop("timeout") = 2000
///

The timeout works fine when the proxy is disabled and the server is shut
down. So not only does the code appear to continue to use the proxy server
when I insert that line of code you recommended, but it also doesn't
timeout.

The cause is exactly as previously explained. Absolutely nothing else
changed except for the proxy server setting enabled in internet explorer.
Even the checkbox labeled "Bypass proxy Server for local addresses" is also
checked and problem still exists.

I guess then my only remaining option is to temporarily disable proxy (if
enabled) while registering the channel, and then re-anabling once
registered. The time period elapsed between disabling proxy / registering
channel / re-anbling proxy is reasonably short, therefore I doubt user will
have an issue with it.

Have you any alternate suggestion? Or advice in disabling/enabling proxy
setting in code?

Thanks for your help
Regards
Harry


"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:Op******** ******@tk2msftn gp13.phx.gbl...
Hi,
what exception you receive?
Is this a server code?

This code should avoid using of any proxy.

Your problem may be somewhere else. Can you try to explain the exact
configuration, in which you see and don't see the problem?

Sunny

In article <#Q************ **@TK2MSFTNGP09 .phx.gbl>, harry@nospam says...
Thanks Sunny. I tried that however unfortunately the same problem still
exists. Have you any other sugestions, or is my code incorrect?

This code is called when loading the form:

Private Sub CreateServerCha nnel()
m_DataManager = New DataManager(Me)

System.Net.Glob alProxySelectio n.Select =
System.Net.Glob alProxySelectio n.GetEmptyWebPr oxy
Dim chnl As New HttpChannel(333 3)
ChannelServices .RegisterChanne l(chnl)

RemotingService s.Marshal(m_Dat aManager, "DataManager.so ap")

End Sub

Thanks
Harry

"Sunny" <su***@newsgrou ps.nospam> wrote in message
news:Ox******** **********@tk2m sftngp13.phx.gb l...
Hi,

In article <uu************ **@TK2MSFTNGP11 .phx.gbl>, harry@nospam says... >
> If my program is started while the proxy setting is disabled, there is
no
> problem.
>
> If my program is running, and the proxy setting is enabled (or
enabled then
> disabled) still no problem with my program.
>
> However, if my program is started / restarted when the proxy setting
is > enabled then my program hangs when trying to communicate with the

server. I
> guess because it is expecting proxy however no proxy server exists on local
> network.
>
> If my program was started when proxy setting was enabled, then proxy

setting
> is disabled, my program still has problems communicating with

server - I > guess it still tries to use proxy server.

The remoting infrastructure reads the proxy settings when channel is
registered. That explains what you see. When you start your program
without proxy set in IE, it registers a channel without using proxy. And even if you enable it later, it does not affect already registered
channel. The same is whit when you start your program with proxy
settings enabled.

>
> I guess my only option is to temporarily disable proxy server (if

enabled)
> prior to creating HTTP channel. Can I do this from VB.NET?

It can be done. But what if your client needs a proxy to connect? I
would put some option for this, so the user can decide if he/she needs
the proxy settings to be used.

If you want to disable the use of the IE settings, you have to put this before the channel registration:

GlobalProxySele ction.Select = GlobalProxySele ction.GetEmptyW ebProxy();

Hope that helps
Sunny


Jul 21 '05 #7

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

Similar topics

0
4765
by: Robb Gilmore | last post by:
WE have a C# .NET app which runs as a service. It posts data to a server using HttpWebrequest. According to the docs I 've read, it should use the proxy settings from IE on the server machine. But it doesn't, it always posts straight to the server. I tried forcing it by doing this: WebProxy defaultProxy = WebProxy.GetDefaultProxy(); webRequest.Proxy = defaultProxy;
7
3621
by: Robert Blasius | last post by:
Hello, I've a problem displaying a header content in Internet Explorer. You can view the problem on www.robert-blasius.de The upperimage should be on the left of the middle "line" and the lower image should appear on the right. It works fine in Firefox, but not in IE 6.0. This is the css-code: div.titletable {
1
3201
by: #Hai | last post by:
Hi, I want Internet Explorer to use localhost server (127.0.0.1) as proxy server instead of connect directly to the ISP. How to do this (by programming) ? Thanks
6
404
by: harry | last post by:
Hi, I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in Internet Explorer connection settings (proxy:8080). However, as soon as this setting is enabled, the remoting program running on their pc stops communicating with the server it sends data to. I've disabled proxy setting on the affected pc, rebooted...
1
3507
by: Apu Nahasapeemapetilon | last post by:
Hello and thank you in advance for your help. Can anyone think of a reason why this code would work properly on one PC, but not another? I've got a System.Windows.Forms.UserControl that products events which I want to consume (sink) within Internet Explorer. I'm following the instructions at: ms-http://support.microsoft.com/default.aspx?kbid=313891.
11
13401
by: Doug van Vianen | last post by:
Hi, I often like to include some JavaScript coding in my web pages to make them more interesting. Unfortunately, even when this coding is as simple as a check to see what the display width is in pixels so that pictures on the page can be adjusted to better fit the display, Internet Explorer detects the coding and blocks it. Of course the user can click on the message displayed above the web page to allow "the active component" but many...
5
3373
by: jd | last post by:
Hi, I have an application that uses embedded IE windows, which doesn't work if the user has set their IE security settings to high. Is there any way to programmatically obtain the security settings for Internet Explorer for the current user? I had a brief look through the registry but by comparing the exported .reg files before and after making changes to the IE settings, I was not able to locate them specifically. Any help at all...
0
8750
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8091
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6701
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6010
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2154
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.