I have been stuck at this for some time now. I am trying to send a bool from my controller to the view through ajax. I tried several different tutorials and methods but can't seem to be able to retrieve some simple data. I was hoping somebody can explain what am I doing wrong.
Here is my code:
Ajax:
$(document).ready(function () {
$.ajax({
    "url": "/social/checkfollow",
    "type": "GET",
    "dataType": "json",
    "success":function(data) {
        console.log(data);
    },
    "error": function(data) {
        console.log(data.status +" "+ data.statusText);
    }
});
});
And the controller:
   [HttpGet]
    public virtual ActionResult CheckFollow()
    {
        var pass = false;
        return Json(new {result = pass});
    }
For some reason i keep getting 500 Internal Service error. i know it's a really basic question and i would really appreciate your help.
 
     
     
    