title: How to Specify a Web Proxy for a Service Reference?
body: <p>I found a simple web service online at <a href="http://chennaiemergency.co.in/sree/s2.php?wsdl" rel="nofollow">http://chennaiemergency.co.in/sree/s2.php?wsdl</a> which i am able to invoke through SOAP UI using 2 float values (1,1) and easily get the response within 1-2 seconds. 
  Now, in a new visual studio 2010 console application project I do "add service reference" and provide the WSDL. Then in the resulting client i do this :</p>
  
  <pre><code>    ServiceReference1.ChnEmergencyPortTypeClient client = new ChnEmergencyPortTypeClient();
      string hospital = client.hospital(1, 1);
  </code></pre>
  
  <p>I get timeout exception after 1 minute. 
  I have disabled firewall for sure. 
  I am using Windows7x64
  I am using internet via proxy server.</p>
  
  <p>I tried same thing via adding web reference, but i got same timeout error.</p>
  
  <p>Now in the web reference implementattio I have done these few modifications :</p>
  
  <pre><code>            WebProxy webProxy = new WebProxy("&lt;my proxy server name&gt;", &lt;port&gt;);
  
              ChnEmergency client = new ChnEmergency();
              client.Timeout = 200000;
              client.Proxy = webProxy;
              string hospital = client.hospital(1, 1);
  </code></pre>
  
  <p>But i still get timeout. Any suggestions where i am missing ?</p>
  
  <p>I did a quick test with a direct (via phone) internel connection which does not involve proxy servers. And i was able to access successfully. This indicates that there is fault in the way i am providing the webproxy. The IE internet setting suggests that my proxy settings are :</p>
  
  <p>Address : a.b.c.com
  Port : 80</p>
  
  <p>So i am bulding a webproxy like this </p>
  
  <pre><code>WebProxy webProxy = new WebProxy("a.b.c.com", 80);
  </code></pre>
  
  <p>Now i dont know if there is some "secure http" concept involved somewhere, nor do i know how to figure out. But a quick try on browser with <a href="http://a.b.c.com" rel="nofollow">http://a.b.c.com</a> and <a href="https://a.b.c.com" rel="nofollow">https://a.b.c.com</a> yielded different results. In the "http" case i got that invalid url. In "https" case error is "Google Chrome's connection attempt to a.b.c.com was rejected. The website may be down, or your network may not be properly configured"</p>
  
  <p>If i use webproxy with https, it says "service point manager is not configure for https"</p>
  
  <p>I used fiddler to see the activities and I see that the request does show up in fiddler. But no response comes. Does this necessarily mean that the request is going through ? Or could the request get blocked at a lower level (ie. after it goes through fiddler).</p>