PDA

View Full Version : Can not log out from my ASP website containing Ext components



springrider
Apr 03, 2012, 7:18 AM
Good morning

Still exploring Ext.Net V2.
I just built a small website with a basic user login: (Creating an ASP.NET Web Site with Basic User Login (http://msdn.microsoft.com/en-us/library/ff184050.aspx))
After being logged and when my current displayed page contains Ext components, i am not able to log out. I need to go to another aspx page with no Ext components to finally logout.

Any feedback on that issue??

Thanks in advance for your help

Sylvain

springrider
Apr 04, 2012, 2:41 AM
Just to provide additional information from my previous post:

I developed exactly the same basic site with simple login access using Ext.Net 1.3.0 and it works perfectly. The login/logout works.

The other issue i found out is the fact that when a page of my ASP.Net website contains an Ext.net v2 component, the layout of my website slightly changes (font bolder,height and width different). There is no such differences on the website developed in Ext.Net v1.3.0: layout is the same between an Ext.net page and a non Ext.Net page.

I have provided a snapshot to better understand my statement.
4069

Thanks a lot for your feedback on the layout and specially the login.

I would like to continue exploring the version 2 which contains features which would be useful for me (Charts).

Waiting for your feedback.

Sylvain

Vladimir
Apr 04, 2012, 10:37 AM
What does it mean " i am not able to log out"? Do you have errors or something else?
it is better if you provide test sample and steps to repriduce the issue

springrider
Apr 04, 2012, 11:12 PM
Thanks Vladimir
These are the different steps to reproduce these issues:

Create a new ASP.Net Web application project in VS2010

By default you will have 2 aspx pages (Default.aspx and About.aspx) and a folder named "account" for authentication
Add Ext.Net version 2 using Nuget
Set Default.aspx as start page
Run the project and using the login link and the register page, create an account.
In the account folder, create a new web form using master page named logged.aspx.

Your logged.aspx should look like this:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="logged.aspx.vb" Inherits="WebApplication10.logged" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

You are logged!!!
</asp:Content>
In your Site.Master file, change your asp:menu to have the second menu item pointing to Account/logged. aspx and name it "Logged"

You should have:

<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/Account/logged.aspx" Text="Logged"/>
</Items>
</asp:Menu>
</div>
Rerun the project, you will see that being logged, by clicking on the "Logged" menu item, you can access the page otherwise you need to provide your credentials.
You see also that when you are on the "Logged" item menu, by logging out, you are automatically redirected to Default.aspx.
Now add a basic EXT.Net component into logged.aspx like a button. Your logged.aspx page should look like that:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="logged.aspx.vb" Inherits="WebApplication10.logged" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server"/>
<ext:Button ID="btnChangePassword" runat="server" Text="Button"/>
You are logged!!!
</asp:Content>

If you run you project, you will see that being logged and being on your "Logged" page, you won't be able to logout, the page will refresh but you will still be logged and you won't be redirected to Default.aspx. You will have to go on a page without a Ext.net component to be able to logout.
Moreover you can see that the layout of your pages between the Default and the Logged pages are slightly different even if they are based on the same Site.Master. It is related to the presence of the Ext.net component.


Hope these step by step will help you reproducing my issue and will give me the ways to solve the logout and layout issues.

Following the same steps with Ext.net v1.3 works great. No problem of logout or layout.

Thanks in advance

Sylvain

springrider
Apr 09, 2012, 10:54 PM
Ext.net Gurus,

Thanks to let me know concerning these issues of logout and layout.
Is it a bug or not? Do you need me to detail my step-by-step explanation?

Thanks

Sylvain

Vladimir
Apr 09, 2012, 11:18 PM
Hi,

By default, ResourceManager removes ViewState from rendering. You can disable it by using DisableViewState property of ResourceManager


<ext:ResourceManager ID="ResourceManager1" runat="server" DisableViewState="false"/>

After that you can logout



Moreover you can see that the layout of your pages between the Default and the Logged pages are slightly different even if they are based on the same Site.Master. It is related to the presence of the Ext.net component.

Ext.Net uses own css styles (ext-all.css file), i guess it conflicts with css styles from Styles/Site.css (ext.net css rules override site.css rules) therefore you see that difference

springrider
Apr 10, 2012, 12:33 AM
Hi,

By default, ResourceManager removes ViewState from rendering. You can disable it by using DisableViewState property of ResourceManager


<ext:ResourceManager ID="ResourceManager1" runat="server" DisableViewState="false"/>

After that you can logout


Ext.Net uses own css styles (ext-all.css file), i guess it conflicts with css styles from Styles/Site.css (ext.net css rules override site.css rules) therefore you see that difference

Thanks Vladimir

The DisableViewState option made my day.

For the css, this is what i thought.
Since there is no Ext-all.css file in my installation i could modify, only virtual URLs, I had to change my style.css to fit the Ext.Net css in order to have my display working.


<link type="text/css" rel="stylesheet" href="/WebResource.axd?d=88RcX5-qhDRrg1WmvqXFkan030demHVA1f1g1kknNXc-kn_JB9w9H4bb8t1qR1SZvfVe6e-6c0y54E4Ni4vuqtzbGsGshjEqqa2vKEdjZ4GnvcQK2t2TJNlIn f6KdQh6W6eqprnjUjBK9kUW0xVS7l7Sc5vt6rEWNatwHhT_sT0 1&amp;t=634689618079470311">
<link type="text/css" rel="stylesheet" href="/WebResource.axd?d=GVVY6FW0O617sRW2HrI3VjwU6Gmtf7B0 S7uv8WRDz87WHekEBv7zqDoeM8iWn4ZeyXqBPAz4sYS3fSI6su WbPQvOov8y60FVv714AJjhWUVB72-PBWY7lQUwYp0Y8zvSDgAEZfVJ08W62s6d-F9TEXma0xwj-1vUCTVr4O1Cgzc1&amp;t=634689618079470311">

Thanks again

Sylvain