0
I’m having problems redirecting a page, in my Ajax Answer, when I am in Firefox in debug mode, I can redirect, without Debug the page only one refresh, I tried other Directs also failed, only works with open Debug, when loading the page the request plays to a filter that validates the user in the Onactionexecuting method, as I said, in the browser Debug everything works. Does anyone have any idea ?
$.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";
}
},
makes a
console.log(response)
I believe from there I can help you better.– Thiago Santos
Now I got it to work but only in Chrome, in Fire Fox the call AJAX goes to Action and then returns neither Success nor error. The answer from Response is this: Object {result: "redirect", url: "/Myapplication/Home/List"}
– Darlan Soares
I’m using window.location.assign(Response.url); with async: true, from ajax, running only Chrome
– Darlan Soares