May 21, 2012, 9:52 AM
empty page after logout in IE
Hi,
I have an issue with login page after logout functionality in IE. The web.config looks like
Then, user presses login button
I tried to remove "Before=" code from logout button but it didn't help. Also I tried to remove ext:Window control and leave just FormPanel, but it didn't help too. It seems like none of ext.net controls is not rendered in described situation.
Give an advice please.
Thanks.
I have an issue with login page after logout functionality in IE. The web.config looks like
<authorization>
<deny users="?" />
</authorization>
<authentication mode="Forms">
<forms loginUrl="~/Membership/Login/" />
</authentication>
So, each page of the site requires authentication. When user opens index page, login page is displayed. Everything is fine here. Then, user presses login button
<ext:Button runat="server" Icon="LockGo" Text="Logout">
<DirectEvents>
<Click Url="/Membership/Logout/" Before="Ext.getBody().mask('Good Bye!', 'x-mask-loading');" />
</DirectEvents>
</ext:Button>
And then logout button is pressedpublic ActionResult Logout()
{
this.FormsAuth.SignOut();
return RedirectToAction("Index", "Home");
}
At this moment mask is displayed and user is redirected to the login page that looks like<ext:ResourceManager runat="server" />
<h1>Some title</h1>
<h2>Some subtitle</h2>
<ext:Window
ID="LoginWindow"
runat="server"
Closable="false"
Resizable="false"
Height="130"
Icon="Lock"
Title="Please, enter your username and password"
Draggable="true"
Width="300"
Modal="true"
Layout="fit"
BodyBorder="false"
Padding="5">
<Items>
<ext:FormPanel
runat="server"
FormID="form1"
Border="false"
Layout="form"
BodyBorder="false"
BodyStyle="background:transparent;"
Url='<%# Html.AttributeEncode(Url.Action("Login")) %>'>
<Items>
<ext:TextField
ID="txtUsername"
runat="server"
FieldLabel="Username"
AllowBlank="false"
BlankText="Username is required."
Text="admin"
AnchorHorizontal="100%"
/>
<ext:TextField
ID="txtPassword"
runat="server"
InputType="Password"
FieldLabel="Password"
AllowBlank="false"
BlankText="Password is required."
Text="admin"
AnchorHorizontal="100%"
/>
</Items>
</ext:FormPanel>
</Items>
<Buttons>
<ext:Button runat="server" Text="Login" Icon="Accept">
<DirectEvents>
<Click
Url="~/Membership/Login/"
Timeout="60000"
FormID="form1"
CleanRequest="true"
Method="POST"
Before="Ext.Msg.wait('Verifying...', 'Authentication');"
Failure="Ext.Msg.show({
title: 'Login Error',
msg: result.errorMessage,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});">
<EventMask MinDelay="250" />
<ExtraParams>
<ext:Parameter Name="ReturnUrl" Value="Ext.urlDecode(String(document.location).split('?')[1]).r || '/'" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:Window>
But sometimes in iE only following problem appears (tested on IE9 32-bit) - login page is displayed without ext.net controls. So I can see title and subtitle (h1 and h2 tags) and nothing else. Page source code shows that head section has links to all required resource files, developer tools show no js errors.I tried to remove "Before=" code from logout button but it didn't help. Also I tried to remove ext:Window control and leave just FormPanel, but it didn't help too. It seems like none of ext.net controls is not rendered in described situation.
Give an advice please.
Thanks.