Using a proxy and a port with WebRequest...

B

Bob Powell [MVP]

It's not often I ask questions but here goes...

I am writing a site that does Instant Payment Notification processing
through PayPal and I need to use HttpWebRequest to hit an HTTPS server at
their site to verify a transaction. The trouble is that the site I'm hosting
on uses a proxy and a port for https so I have to make the request use this
instead.

I would normally do this....

httpWebRequest =
(HttpWebRequest)WebRequest.Create(https://www.paypal.com/cgi-bin/webscr);



but somehow I need to proxy this through a server with an IP address of
123.123.123.123 on port 3128.

Can someone point me in the right direction??




--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
G

Gabriel Lozano-Morán

proxy element in config

Eg:
<system.net>
<defaultProxy>
<proxy
usessystemdefault = "false"
proxyaddress = "http://123.123.123.123:3128"
bypassonlocal = "true"
/>
</defaultProxy>
</system.net>


Gabriel Lozano-Morán
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top