So I'm just trying to post data to a page with ajax.. but it doesn't work.. any ideas?

```
                $.ajax({
                url: '/REST/GetResponse.cshtml',
                type: "POST",
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify({
                    username: $('#username').val(),
                    firstname: $('#firstname').val(),
                    lastname: $('#lastname').val(),
                    email: $('#email').val(),
                    password1: $('#password1').val(),
                    password2: $('#password2').val(),
                }),
                success: function (result) {
                    alert("success " + result.UserName);
                },
                error: function (result) {
                    alert("Failed");
                }

            });
        }

```

That is my ajax post - 

```
@{
if (IsPost)
{
    var password = Request["password1"];
    var username = Request["username"];
}

```

}

That is the page where its being posted to but when I look at the console it says (cancelled) and the error functions pops the alert.

I appreciate your help :) thank you