Connecting Tech Pros Worldwide Help | Site Map

Connecting to webserver over proxy

  #1  
Old July 3rd, 2008, 04:51 PM
Member
 
Join Date: Apr 2007
Posts: 75
Hi Guys,
I am writing a new application which will download files from http web server [c# .Net 2.0] using MTOM & WSE 3. I have written a test client for this [in c# .Net 2.0] which works fine on normal networks. I run into problem when the network where client is running is Proxy.

Can someone please advise how can I connect using proxy to the web service for clients using proxy? If possible some tutorial or a sample project would be highly appreciated as I have never worked with proxy networks before!


Thanks in advance!
  #2  
Old July 3rd, 2008, 05:38 PM
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,096
Provided Answers: 3

re: Connecting to webserver over proxy


I *think* you can attempt to look in the registry (Where? don't know) to find the proxy information stored with IE. (What to do if they don't use IE, I also don't know) And could try using that?

I think that the HttpWebRequest object has support for putting proxy information in. There might be some msdn help in that area.

Basic HTTP request
Expand|Select|Wrap|Line Numbers
  1. GET / HTTP/1.0
  2.  
  3.  
Basic HTTP request through a proxy
Expand|Select|Wrap|Line Numbers
  1. GET http://bytes.com/ HTTP/1.0
  2.  
  3.  

Note, that when going through a proxy, the request URI in the GET line has the full web address (the proxy can then chose to send off the regular HTTP request to the correct location that way)
  #3  
Old July 4th, 2008, 09:07 AM
Member
 
Join Date: Apr 2007
Posts: 75

re: Connecting to webserver over proxy


Quote:
Originally Posted by Plater
I *think* you can attempt to look in the registry (Where? don't know) to find the proxy information stored with IE. (What to do if they don't use IE, I also don't know) And could try using that?

I think that the HttpWebRequest object has support for putting proxy information in. There might be some msdn help in that area.

Basic HTTP request
Expand|Select|Wrap|Line Numbers
  1. GET / HTTP/1.0
  2.  
  3.  
Basic HTTP request through a proxy
Expand|Select|Wrap|Line Numbers
  1. GET http://bytes.com/ HTTP/1.0
  2.  
  3.  

Note, that when going through a proxy, the request URI in the GET line has the full web address (the proxy can then chose to send off the regular HTTP request to the correct location that way)
Thanks Plater. I am not too fussed about retrieving these settings from IE registry as most users will be more than happy to re-enter this information. Can someone guide me to a sample for HTTP MTOM request over proxy?

Thanks,
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot use mail() in IE, only works in a debugger--help baustin75@gmail.com answers 8 October 5th, 2005 06:15 PM