title: How to Call MVC web Controller from Xamarin Android App
body: <pre><code>string apiUrl1 = string.Format(@"http://xxx.xxx.x.xxx/test/Home/getdata?id=1");
  
  public static string GetData(string url)
      {
  
          string Result = "";
          try
          {
              using (WebClient client = new WebClient())
              {
                  Result = client.DownloadString(string.Format(@"" + url + ""));
  
  
              }
          }
          catch (Exception e)
          {
              string msg = e.Message;
              Result = "";
          }
          return Result;
      }
  </code></pre>
  
  <p>I am trying to get Data from my Published .Net MVC Web Project But i am getting Server Error "<strong>The remote server returned an error: (500) Internal Server Error.</strong>"</p>
  
  <p>My MVC Controller Code is Here</p>
  
  <pre><code>public JsonResult getdata(int? id)
      {
          List&lt;Items&gt; dbItems = Items.getItemsData(id);
  
          return Json(dbItems, JsonRequestBehavior.AllowGet);
      }
  </code></pre>