title: C# reading information from Android
body: <p>i trying to do a simple login function.
  The login will be made by an App and the information goes to a WebService (in C#).</p>
  
  <p>My app is send the information to the server via HttpPost. But i can't get and return this information on the Web Service side</p>
  
  <p>To make the request (android side) i was using:</p>
  
  <pre><code>// Building Parameters
  List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
  params.add(new BasicNameValuePair("username", user.getText().toString()));
  params.add(new BasicNameValuePair("password", pass.getText().toString()));
  
  DefaultHttpClient httpClient = new DefaultHttpClient();
  HttpPost httpPost = new HttpPost(url);
  httpPost.setEntity(new UrlEncodedFormEntity(params));
  
  HttpResponse httpResponse = httpClient.execute(httpPost);
  HttpEntity httpEntity = httpResponse.getEntity();
  is = httpEntity.getContent();
  </code></pre>
  
  <p>On the WebService side, i was try to use the <strong>Serialize</strong> method, but it doens't work</p>
  
  <p>Ps.: In order to test, i tried to run on another WebService (this one built with PHP), and works fine.</p>
  
  <p>Any ideas how to make this work??</p>
  
  <p><strong>[Edit]</strong></p>
  
  <p>This is the web service side:</p>
  
  <pre><code>[HttpPost]
  public string LogarAplicativo()
  {
      //Request.InputStream.Seek(0, SeekOrigin.Begin);
      string jsonData = new StreamReader(Request.InputStream).ReadToEnd();
      dynamic data = JObject.Parse(jsonData);
  
      //DB validation's
  
      var json = "";
      var serializer = new JavaScriptSerializer();
      json = serializer.Serialize(new { success = "0", message = "Test message!" });
      return json;
  }
  </code></pre>