473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using a proxy and a port with WebRequest...

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.


Nov 19 '05 #1
3 10492
Check out the HttpWebRequest.Proxy property

-Brock
DevelopMentor
http://staff.develop.com/ballen
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/websc
r);

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??

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.


Nov 19 '05 #2
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
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
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.


Nov 19 '05 #3
Thanks. That was the trick I was looking for.

--
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.

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:56**********************@msnews.microsoft.com ...
Check out the HttpWebRequest.Proxy property

-Brock
DevelopMentor
http://staff.develop.com/ballen
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/websc
r);

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??

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.


Nov 19 '05 #4

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

Similar topics

2
by: Manfred Braun | last post by:
Hi All, I am trying to access xml-files in the internet from my intranet-page. Making XmlDocument.Load() calls internally works fine, but not so to the internet. I think the calls are failing,...
2
by: vipin | last post by:
Hi All, I am looking for a sample c# program which demonstrates how to create a webrequest(http) and send it to a webservice (specified using port no.) thank you vipin
10
by: Abubakar | last post by:
hi, I work on a computer that is part of a network and uses proxy to connect to net. I cant connect to servers outside my proxy with simple ConnectTo code. I need to know how to make my requests go...
6
by: Jensen Bredhal | last post by:
Hello, I need to send command to a web server from a method. I understand this should be possible using the WebClient or WebRequest class. how can this be done? below an example of my...
0
by: deepak | last post by:
Hi All, i m develpoing a .net Window application which has 4 texboxes(tbxURLmfor URL in URL Frame,tbxAddress for address in Proxy server frame,tbxPort for port in proxy server...
0
by: Maxx57 | last post by:
C# VS.Net 1.1 (2003) - trouble with using IE proxy server settings I've got a program that detects if it can connect to a webservice. It sends a System.Net.WebRequest and then checks the...
1
by: moo | last post by:
Is there a simple way to get my logon credentials to make my web request work through our proxy server? I tried CredentialCache.DefaultCredentials, but I get nothing back. I can get it to work if I...
3
by: =?Utf-8?B?UmljaGFyZEBub3NwYW0ubm9zcGFt?= | last post by:
My webcam app runs OK on XP but not on Vista. Here's my code snippet that has been working up until now: System.Net.WebRequest request; System.Net.WebResponse response; request =...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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,...

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.