title: Making an Ajax request to a page method in ASP.NET MVC 2
body: <p>I'm trying to call a page method belonging to a MVC Controller from another site, by means of:</p>
  
  <pre><code>$.ajax({
            type: "GET",
            url: "http://localhost:54953/Home/ola",
            data: "",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(data) {
                  console.log(data.Name);
            }
          });
  </code></pre>
  
  <p>the method code is as follows, really simple, just to test:</p>
  
  <pre><code> public ActionResult ola()
      {
  
          return Json(new ActionInfo()
          {
              Name = "ola"
          },JsonRequestBehavior.AllowGet);
  
      }
  </code></pre>
  
  <p>I've seen this aproach being suggested here, and I actually like it a lot, should it work...</p>
  
  <p>When I run this, firebug gets a 200 OK, but the data received is null.</p>
  
  <p>I've tried a lot of different approaches, like having the data in text (wish grants me "(an empty string)" instead of just "null") or returning string in the server method...</p>
  
  <p>Can you tell me what am I doing wrong?</p>
  
  <p>Thank you in advance,</p>
  
  <p>João</p>