25. July 2009 13:53
When you are accessing internet using proxy server you must tell the client to use proxy server details.
Proxy server can be your network machine connected to Internet or any public proxy. To know how client and server communicate with each other refer
http://www.revenmerchantservices.com/post/2010/01/25/client-server-communication.aspx
Lets take an e.g. of IE. Here you can see I'm browsing internet using Proxy server.

Here I told IE to use proxy server while accessing internet. Same way you can see in Google Gtalk, Yahoo chat etc.
Look at gtalk proxy screenshot.

Any requests that goes through IE or any other client needs to be configured to use proxy.
Now, I will show you how you can tell your .Net developed application to use proxy while accessing the web.
I hope you are familiar with HttpWebRequest and HttpWebRequest found at System.Net name-space.
you need to create an instance of WebProxy and tell HttpWebRequest object to use this proxy settings.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(api);
WebProxy proxy = new WebProxy("192.168.1.100",3321);
// if your proxy server requires credentials to access it use below code
NetworkCredential credentials = new NetworkCredential("UserNAme","Password")
// notify your proxy instance about these credentials
proxy.Credentials = credentials;
// now your proxy instance is ready to pass along with the request
request.Proxy = proxy;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(API);
// setting up connection with web and posting vai GET method
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Returns httpwebresponse
StreamReader reader = new StreamReader(response.GetResponseStream());
// Read response stream
string strReponse = reader.ReadToEnd();
Satalaj