WebRequest & proxy problem

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

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....
 
Thus wrote Lloyd,
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
 
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....
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...... ?
 
Thus wrote Lloyd,
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).
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.
 
I saw also the NetSectionGroup.DefaultProxy propery.
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!
 
Thus wrote Lloyd,
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 ;-)
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,
 
Back
Top