Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old July 3rd, 2008, 04:51 PM
Member
 
Join Date: Apr 2007
Posts: 61
Default Connecting to webserver over proxy

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!
Reply
  #2  
Old July 3rd, 2008, 05:38 PM
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 6,121
Default

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)
Reply
  #3  
Old July 4th, 2008, 09:07 AM
Member
 
Join Date: Apr 2007
Posts: 61
Default

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
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles