Receiving data from Android in a ASP.NET web site
<p>I wrote an Android app that sends data to an ASP.NET web site. When I test the app, I get the error:</p>

<blockquote>
  <p>Connection to <code>https://localhost:1863</code> refused.</p>
</blockquote>

<p>How do I solve this problem? Also, how do I go about storing this data into <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server" rel="nofollow">SQL&nbsp;Server</a>?</p>

<pre><code>HttpClient client1 = new DefaultHttpClient();

HttpPost request = new HttpPost("http://localhost:1863");

String lat = "lat",lng = "lng";

List&lt;NameValuePair&gt; postParameters = new ArrayList&lt;NameValuePair&gt;(3);
postParameters.add(new BasicNameValuePair("lat", lat));
postParameters.add(new BasicNameValuePair("lng", lng));
try {
    request.setEntity(new UrlEncodedFormEntity(postParameters));
    UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(postParameters);
    request.setEntity(formEntity);
    // request.addHeader("Content-type", "application/x-www-form-urlencoded");
    HttpResponse response;
    response = client1.execute(request);
    BufferedReader in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
    String line;
    String page = "";
    line = in.readLine();
    while (line != null)
    {
        page = page + line;
        line = in.readLine();
    }
}
catch (ClientProtocolException e) {
    e.printStackTrace();} catch (UnsupportedEncodingException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} 
catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
</code></pre>
