Home All Groups Group Topic Archive Search About

WebRequest & proxy problem

Author
22 Mar 2006 6:44 AM
Lloyd Dupont
In my auto-update code I donwload some files from the net with a WebRequest.
Some people having a proxy server reported problems.

IN a previous application I set the
WebRequest wr = ....;
wr.Proxy = WebProxy.GetDefaultProxy();

Which read proxy info from internet explorer. Great, exactly what I want.

But this method is now, in 2.0, apparemtly obsolete.
What could I use?

I read somewhere that someone suggested WebRequest.DefaultWebProxy, but
that's crazy, why set it if it's the default already?
I saw also the NetSectionGroup.DefaultProxy propery.

So now, what should I do?
Problem is I cannot test, we are not using proxy here .... :S and I don't
really know they work....

Author
22 Mar 2006 6:56 PM
Joerg Jooss
Thus wrote Lloyd,

Show quote
> In my auto-update code I donwload some files from the net with a
> WebRequest. Some people having a proxy server reported problems.
>
> IN a previous application I set the
> WebRequest wr = ....;
> wr.Proxy = WebProxy.GetDefaultProxy();
> Which read proxy info from internet explorer. Great, exactly what I
> want.
>
> But this method is now, in 2.0, apparemtly obsolete. What could I use?
>
> I read somewhere that someone suggested WebRequest.DefaultWebProxy,
> but
> that's crazy, why set it if it's the default already?

Exactly. But don't forget that .NET 2.0 uses IE's proxy settings by default,
including the resolution of proxies via PACs. So there's actually nothing
to do...

> I saw also the NetSectionGroup.DefaultProxy propery.
> So now, what should I do?
> Problem is I cannot test, we are not using proxy here .... :S and I
> don't

That's a poor excuse for not testing.

"What, you run VS2005 on a Gateway PC? Sorry, we simply don't use Gateway
hardware, can you get one from a different vendor?"

:-O
--
Joerg Jooss
news-re***@joergjooss.de
Author
23 Mar 2006 12:45 AM
Lloyd Dupont
> Exactly. But don't forget that .NET 2.0 uses IE's proxy settings by
> default, including the resolution of proxies via PACs. So there's actually
> nothing to do...
>
does it?
mmhh...
obviously these people are able to use internet explorer (as they downloaded
our product), but the WebRequest didn't work. So I wonder if it really
does....

>> I saw also the NetSectionGroup.DefaultProxy propery.
>> So now, what should I do?
>> Problem is I cannot test, we are not using proxy here .... :S and I
>> don't
>
> That's a poor excuse for not testing.
> "What, you run VS2005 on a Gateway PC? Sorry, we simply don't use Gateway
> hardware, can you get one from a different vendor?"
>
Are you frustrated or something?
Of course I would like to test, but how could I?
I though here was a place of answer instead of useless taunt...... ?
Author
23 Mar 2006 7:11 AM
Joerg Jooss
Thus wrote Lloyd,

>> Exactly. But don't forget that .NET 2.0 uses IE's proxy settings by
>> default, including the resolution of proxies via PACs. So there's
>> actually nothing to do...
>>
> does it?
> mmhh...
> obviously these people are able to use internet explorer (as they
> downloaded
> our product), but the WebRequest didn't work. So I wonder if it really
> does....

It does for me (for a fixed proxy).

>>> I saw also the NetSectionGroup.DefaultProxy propery.
>>> So now, what should I do?
>>> Problem is I cannot test, we are not using proxy here .... :S and I
>>> don't
>> That's a poor excuse for not testing.
>> "What, you run VS2005 on a Gateway PC? Sorry, we simply don't use
>> Gateway
>> hardware, can you get one from a different vendor?"
> Are you frustrated or something?
> Of course I would like to test, but how could I?
> I though here was a place of answer instead of useless taunt...... ?

I wasn't taunting, merely really wondering about software engineering practices
these days (assuming all of this happens in a business environment).

What about installing a simple proxy like Fiddler and test with that? It
can automatically register itself as system proxy, so you don't even have
to change your IE settings.
--
Joerg Jooss
news-re***@joergjooss.de
Author
24 Mar 2006 1:03 AM
Lloyd Dupont
Show quote
>>>> I saw also the NetSectionGroup.DefaultProxy propery.
>>>> So now, what should I do?
>>>> Problem is I cannot test, we are not using proxy here .... :S and I
>>>> don't
>>> That's a poor excuse for not testing.
>>> "What, you run VS2005 on a Gateway PC? Sorry, we simply don't use
>>> Gateway
>>> hardware, can you get one from a different vendor?"
>> Are you frustrated or something?
>> Of course I would like to test, but how could I?
>> I though here was a place of answer instead of useless taunt...... ?
>
> I wasn't taunting, merely really wondering about software engineering
> practices these days (assuming all of this happens in a business
> environment).
hehehe...
what's wrong with business environment?
anyway I think the term to describe my company would be: an ISV, so it's
probably not what you call a 'business'.

> What about installing a simple proxy like Fiddler and test with that? It
> can automatically register itself as system proxy, so you don't even have
> to change your IE settings.
Fiddler you said?
Definitely a good tip, thanks!
Author
24 Mar 2006 7:26 AM
Joerg Jooss
Thus wrote Lloyd,

>> I wasn't taunting, merely really wondering about software engineering
>> practices these days (assuming all of this happens in a business
>> environment).
>>
> hehehe...
> what's wrong with business environment?
> anyway I think the term to describe my company would be: an ISV, so
> it's
> probably not what you call a 'business'.

I meant creating software as a business -- consulting, creating shrink wrapped
apps, etc. In that case I'd consider "we can't test, we have no proxy" a
bit... disappointing. If that software was some home grown app for friends
& familiy I wouldn't be that picky ;-)

>> What about installing a simple proxy like Fiddler and test with that?
>> It can automatically register itself as system proxy, so you don't
>> even have to change your IE settings.
>>
> Fiddler you said?
> Definitely a good tip, thanks!

This thing gets better with each release. Only yesterday I realized that
the latest version can create VSTS Web Tests from its captures, which is
awesome.

Cheers,
--
Joerg Jooss
news-re***@joergjooss.de

AddThis Social Bookmark Button