$.ajax({
type: "POST",
url: "/Controller/Methods/" + $('#FrameworkId').val() + "/10/" + $('#category').val(),
success: function(data) {
alert("sucess")
},
error:function(data) {
alert(data.statuscode)
}
});
And in server side
suppose in server side In the action i am just doing
filterContext.HttpContext.Response.StatusCode = 401;
throw new UnauthorizedAccessException("Login_Expired");
Still alert(data.statuscode)
gives 500
What can I do to get 401 as I set it?