title: Calling WebMethod from android
body: <p>I have used the code from this answer <a href="https://stackoverflow.com/questions/24199494/android-services-with-restfull-web-services">Android services with RestFull web services</a></p>
  
  <p>but when I try to call like this,</p>
  
  <pre><code>json = restClientService.getResponseAsJSON("http://192.168.2.242/Test.aspx/Hello", params);
  </code></pre>
  
  <p>my asp.net web pages webmethod doesn't get fired. I added Page_Load code looks working but I want to be able to call WebMethods rather then page itself.</p>
  
  <pre><code>public partial class Test : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          Response.Write(new { Hi = "Mr" });
          Response.End();
      }
  
      [WebMethod]
      [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
      public object Hello()
      {
          return new { Hi = "Mr" };
      }
  }
  </code></pre>