Redirect Page in response AJAX in Asp.net Mvc

0

I'm having problems redirecting a page, in response to my Ajax, when I'm in FireFox in debug mode, I can redirect, without Debug the page only of a refresh, tried other redirects also failed, only works with Debug open, loading the page the request throws to a filter that validates the user in the OnActionExecuting method, as I said, in the browser Debug everything works. Anyone have any ideas?

$.ajax({
            type: "POST",
            url: "/MyApplication/Account/Login",
            data: dataObject,
            async: false,
            cache: false,
            contentType: "application/json",
            datatype:"json",
            success: function (response) {

                if (response.result == 'redirect') {

                    window.location.href = "/MyApplication/Home/List";

                }
            },
    
asked by anonymous 02.02.2017 / 19:27

0 answers