title: Socket permissions exception when attempting to read a page via HttpClient.GetStringAsync
body: <p>I am trying a Windows 8 App which gets source code of a webpage and extract some important data. But I am receiving this when <code>getStringAsync</code> function get called.</p>
  
  <blockquote>
    <p>System.Net.Http.HttpRequestException: An error occurred while sending
    the request. ---> System.Net.WebException: Unable to connect to the
    remote server ---> System.Net.Sockets.SocketException: An attempt was
    made to access a socket in a way forbidden by its access permissions
    173.194.41.64:443    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)</p>
  </blockquote>
  
  <p>Here is the code </p>
  
  <pre class="lang-csharp prettyprint-override"><code>const string feedUrl = "https://google.com";
  HttpClient Client = new HttpClient();
  Client.MaxResponseContentBufferSize = int.MaxValue;
  Client.Timeout = System.TimeSpan.FromSeconds(300);
  var source = await Client.GetStringAsync(feedUrl);
  </code></pre>