I see many ways to accomplish setting up proxy settings for a web request in
the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within
a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an
individual basis, and I don't want to rely on the bypassLocal setting, or
the host exclusion list since I don't find those settings to be reliable in
IE itself.
2) mind as well ask since its related and I will probably want to do this at
some point. What is the current and correct way to tell an individual
httpWebReqest to *not* use any proxy? 7 2999
djc,
By default, HttpWebRequest instances should be created without the Proxy
property being set. That is good enough.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests
within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an
individual basis, and I don't want to rely on the bypassLocal setting, or
the host exclusion list since I don't find those settings to be reliable
in IE itself.
2) mind as well ask since its related and I will probably want to do this
at some point. What is the current and correct way to tell an individual
httpWebReqest to *not* use any proxy?
thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test
machine on the same network the httpWebRequest is using IE's proxy settings
by default. I have verified this with the following output right before
issuing the getResponse:
Console.WriteLine("current proxy is: {0}", myHTTPRequest.Proxy.GetProxy(new
Uri(_url)));
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OO**************@TK2MSFTNGP03.phx.gbl...
djc,
By default, HttpWebRequest instances should be created without the
Proxy property being set. That is good enough.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
Ahh, it appears that by default, it returns the value from the static
Select method on the GlobalProxySelection class.
You can simply set the Proxy property to the value of the static
GetEmptyWebProxy method on the GlobalProxySelection class in order to
specify no proxy.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test
machine on the same network the httpWebRequest is using IE's proxy
settings by default. I have verified this with the following output right
before issuing the getResponse:
Console.WriteLine("current proxy is: {0}",
myHTTPRequest.Proxy.GetProxy(new Uri(_url)));
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:OO**************@TK2MSFTNGP03.phx.gbl...
>djc,
By default, HttpWebRequest instances should be created without the Proxy property being set. That is good enough.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>>>I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
That is actually what prompted my post here because the GlobalProxySelection
class is marked obsolete in VS 2005 but there is no note as to what *should*
be used in it's place. I think I recall reading that you can create an
instance of the webProxy class without assigning a proxy address (keeping it
null) and assign that instance of the webProxy class to the
httpWebRequest.proxy property. Since the address is null it doesn't use the
proxy. I'm not sure though, and have not played with it. Even if that worked
I wanted to verify that it is what *should* be done. Again, VS documentation
stated that the GlobalProxySelection class is obsolete but did *not* state
what *should* be used. At least I didn't see it.
thanks again for the reply though. I do appreciate it.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:em**************@TK2MSFTNGP03.phx.gbl...
Ahh, it appears that by default, it returns the value from the static
Select method on the GlobalProxySelection class.
You can simply set the Proxy property to the value of the static
GetEmptyWebProxy method on the GlobalProxySelection class in order to
specify no proxy.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test machine on the same network the httpWebRequest is using IE's proxy settings by default. I have verified this with the following output right before issuing the getResponse: Console.WriteLine("current proxy is: {0}", myHTTPRequest.Proxy.GetProxy(new Uri(_url))); "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in message news:OO**************@TK2MSFTNGP03.phx.gbl...
>>djc,
By default, HttpWebRequest instances should be created without the Proxy property being set. That is good enough.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl.. . I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
djc,
If you go ahead and use the obsolete code in your project and set a
breakpoint on it, I am sure the warning message will tell you what code to
use. I say this because I have seen it.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"djc" wrote:
That is actually what prompted my post here because the GlobalProxySelection
class is marked obsolete in VS 2005 but there is no note as to what *should*
be used in it's place. I think I recall reading that you can create an
instance of the webProxy class without assigning a proxy address (keeping it
null) and assign that instance of the webProxy class to the
httpWebRequest.proxy property. Since the address is null it doesn't use the
proxy. I'm not sure though, and have not played with it. Even if that worked
I wanted to verify that it is what *should* be done. Again, VS documentation
stated that the GlobalProxySelection class is obsolete but did *not* state
what *should* be used. At least I didn't see it.
thanks again for the reply though. I do appreciate it.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:em**************@TK2MSFTNGP03.phx.gbl...
Ahh, it appears that by default, it returns the value from the static
Select method on the GlobalProxySelection class.
You can simply set the Proxy property to the value of the static
GetEmptyWebProxy method on the GlobalProxySelection class in order to
specify no proxy.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test
machine on the same network the httpWebRequest is using IE's proxy
settings by default. I have verified this with the following output right
before issuing the getResponse:
Console.WriteLine("current proxy is: {0}",
myHTTPRequest.Proxy.GetProxy(new Uri(_url)));
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:OO**************@TK2MSFTNGP03.phx.gbl... djc,
By default, HttpWebRequest instances should be created without the Proxy property being set. That is good enough.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl... I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
ok, will do. Thanks.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:9C**********************************@microsof t.com...
djc,
If you go ahead and use the obsolete code in your project and set a
breakpoint on it, I am sure the warning message will tell you what code to
use. I say this because I have seen it.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"djc" wrote:
>That is actually what prompted my post here because the GlobalProxySelection class is marked obsolete in VS 2005 but there is no note as to what *should* be used in it's place. I think I recall reading that you can create an instance of the webProxy class without assigning a proxy address (keeping it null) and assign that instance of the webProxy class to the httpWebRequest.proxy property. Since the address is null it doesn't use the proxy. I'm not sure though, and have not played with it. Even if that worked I wanted to verify that it is what *should* be done. Again, VS documentation stated that the GlobalProxySelection class is obsolete but did *not* state what *should* be used. At least I didn't see it.
thanks again for the reply though. I do appreciate it.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in message news:em**************@TK2MSFTNGP03.phx.gbl...
Ahh, it appears that by default, it returns the value from the
static
Select method on the GlobalProxySelection class.
You can simply set the Proxy property to the value of the static
GetEmptyWebProxy method on the GlobalProxySelection class in order to
specify no proxy.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl... thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test machine on the same network the httpWebRequest is using IE's proxy settings by default. I have verified this with the following output right before issuing the getResponse: Console.WriteLine("current proxy is: {0}", myHTTPRequest.Proxy.GetProxy(new Uri(_url))); "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:OO**************@TK2MSFTNGP03.phx.gbl... djc,
By default, HttpWebRequest instances should be created without the Proxy property being set. That is good enough.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl.. . I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
Error 1 Warning as Error: 'System.Net.GlobalProxySelection' is obsolete:
'This class has been deprecated. Please use WebRequest.DefaultWebProxy
instead to access and set the global default proxy. Use 'null' instead of
GetEmptyWebProxy.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:9C**********************************@microsof t.com...
djc,
If you go ahead and use the obsolete code in your project and set a
breakpoint on it, I am sure the warning message will tell you what code to
use. I say this because I have seen it.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"djc" wrote:
>That is actually what prompted my post here because the GlobalProxySelection class is marked obsolete in VS 2005 but there is no note as to what *should* be used in it's place. I think I recall reading that you can create an instance of the webProxy class without assigning a proxy address (keeping it null) and assign that instance of the webProxy class to the httpWebRequest.proxy property. Since the address is null it doesn't use the proxy. I'm not sure though, and have not played with it. Even if that worked I wanted to verify that it is what *should* be done. Again, VS documentation stated that the GlobalProxySelection class is obsolete but did *not* state what *should* be used. At least I didn't see it.
thanks again for the reply though. I do appreciate it.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in message news:em**************@TK2MSFTNGP03.phx.gbl...
Ahh, it appears that by default, it returns the value from the
static
Select method on the GlobalProxySelection class.
You can simply set the Proxy property to the value of the static
GetEmptyWebProxy method on the GlobalProxySelection class in order to
specify no proxy.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl... thanks for the reply Nicholas.
I am seeing a different behavior here. On my machine and another test machine on the same network the httpWebRequest is using IE's proxy settings by default. I have verified this with the following output right before issuing the getResponse: Console.WriteLine("current proxy is: {0}", myHTTPRequest.Proxy.GetProxy(new Uri(_url))); "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:OO**************@TK2MSFTNGP03.phx.gbl... djc,
By default, HttpWebRequest instances should be created without the Proxy property being set. That is good enough.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"djc" <no***@nowhere.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl.. . I see many ways to accomplish setting up proxy settings for a web request in the documentation but many of them are marked as obsolete.
1) What is the current and correct way to tell all my httpWebRequests within a class to *not* use any proxy server?
I don't want to setup the proxy on each webRequest within my class on an individual basis, and I don't want to rely on the bypassLocal setting, or the host exclusion list since I don't find those settings to be reliable in IE itself.
2) mind as well ask since its related and I will probably want to do this at some point. What is the current and correct way to tell an individual httpWebReqest to *not* use any proxy?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jamie Laundon |
last post by:
Hi,
WebProxy.GetDefaultProxy() has been deprecated in .NET 2.0, what is the
preferred new method of retrieving IE Proxy settings?
Thanks,
Jamie
|
by: Jim Douglas |
last post by:
I have a requirement to dynamically create a webProxy object in C#. I have
created an instance of the webProxy and stored it within a hashtable then
placing the hashtable in cache. When required I...
|
by: vooose |
last post by:
Consider accessing a webpage through a proxy server:
WebRequest request = WebRequest.Create("http://somepage.com");
WebProxy proxy = new WebProxy(proxyHost, proxyPort);
proxy.Credentials = new...
|
by: Sam Santiago |
last post by:
I am using the WebProxy.GetDefaultProxy() function to read the IE settings, but it's returning an empty WebProxy object. Are there any known reasons why this is not reading the proxy settings in IE...
|
by: Michael S. Scherotter |
last post by:
I am building a C# desktop application in .Net 1.1 that consumes web
services. I use System.Net.WebProxy.GetDefaultProxy() to get the proxy
settings from IE but I get reports from people who are...
|
by: Andrew |
last post by:
Morning everybody,
I have an XML document located on a web address and I wish to create a
C# program to read that XML document and process it - which shouldn't
be that difficult yet I'm running...
|
by: John A Grandy |
last post by:
I am always RAS'd into MS CorpNet VPN under my REDMOND account.
I am always able to ping "itgproxy.redmond.corp.microsoft.com"
I instantiate a System.Net.WebProxy object as follows:
using...
|
by: Armin Prosch |
last post by:
Hi,
we call a web service in an intranet environment. The target host is
bypassed as of the IE setting. We retrieve the system proxy settings through
"myService.Proxy =...
|
by: =?Utf-8?B?TXJOb2JvZHk=?= |
last post by:
I found an example online and when I tried repeating it with the proxy I
normally use for my browser, I get errors.
What I do is this:
WebProxy proxy = new...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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: 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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
|
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...
| |