PDA

View Full Version : [CLOSED] Redirect to login page when session expires



crsodre
Oct 16, 2013, 5:56 PM
Hi, I am having problem when session expires and I select any item in accordion menu. The login window appears inside the tabpanel. I tryed many things, without success.

Please see attached images.

Thanks

Web.config


<authentication mode="Forms">

<forms name="umz_start" loginUrl="/Default.aspx" timeout="1" protection="All" />

</authentication>

<authorization>
<deny users="?" />
</authorization>

Baidaly
Oct 16, 2013, 6:54 PM
Hello!

Try to redirect to another page:


<forms name="umz_start" loginUrl="/RedirectToLogin.aspx" timeout="1" protection="All" />

That page should contain the following JS in its body:


window.top.location = '/Default.aspx';

crsodre
Oct 25, 2013, 3:10 PM
Hi,


1 window.top.location = '/Default.aspx';
Work fine in Chrome, but cause loop in IE and FF.

I found this and works well.


if (top.location != self.location) {
top.location = self.location.href
}

Thanks

Daniil
Oct 25, 2013, 4:43 PM
Thank you for sharing that.