[Mono-bugs] [Bug 75051][Maj] New - Session.Abandon() don't destroy the session...

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu May 26 02:43:34 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by informatique.internet at fiducial.fr.

http://bugzilla.ximian.com/show_bug.cgi?id=75051

--- shadow/75051	2005-05-26 02:43:34.000000000 -0400
+++ shadow/75051.tmp.4948	2005-05-26 02:43:34.000000000 -0400
@@ -0,0 +1,131 @@
+Bug#: 75051
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Web
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: informatique.internet at fiducial.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Session.Abandon() don't destroy the session...
+
+On MS.NET, when you do a Session.Abandon(); 
+the session is destroyed, and a new one is rebuild when you ask for a session 
+variable again.
+On Mono, Session.Abandon() has no effect... you must do a Session.Clear()...
+
+I've a small test case that show a different behaviour between mono and 
+MS.NET...
+
+is it a mono bug???
+thanks...
+
+
+using System; 
+using System.Collections; 
+using System.ComponentModel; 
+using System.Web; 
+using System.Web.SessionState; 
+using System.Web.UI; 
+using System.Web.UI.WebControls; 
+using System.Web.UI.HtmlControls; 
+ 
+namespace WebApplication1 
+{ 
+        /// <summary> 
+        /// Description rsume de WebForm1. 
+        /// </summary> 
+        public class WebForm1 : System.Web.UI.Page 
+        { 
+                protected System.Web.UI.WebControls.HyperLink HyperLink1; 
+                protected System.Web.UI.WebControls.LinkButton LinkButton1;
+                protected System.Web.UI.WebControls.Label lblTest; 
+         
+                private void Page_Load(object sender, System.EventArgs e) 
+                {
+                        if (Request.QueryString["A"]!=null)
+                        {
+                                Session.Abandon();
+                                Session.Clear();
+                        }
+                        if (Session["MAVALEUR"]!=null)
+                                lblTest.Text=Session["MAVALEUR"].ToString();
+                        else
+                                lblTest.Text="VALEUR VIDE!!";
+                                 
+                        // Placer ici le code utilisateur pour initialiser
+la page 
+                        LinkButton1.Text="Fill Session"; 
+                } 
+ 
+                #region Code gnr par le Concepteur Web Form 
+                override protected void OnInit(EventArgs e) 
+                { 
+                        // 
+                        // CODEGEN: Cet appel est requis par le Concepteur
+Web Form ASP.NET. 
+                        // 
+                        InitializeComponent(); 
+                        base.OnInit(e); 
+                } 
+                 
+                /// <summary> 
+                /// Mthode requise pour la prise en charge du concepteur -
+ne modifiez pas 
+                /// le contenu de cette mthode avec l'diteur de code. 
+                /// </summary> 
+                private void InitializeComponent() 
+                {     
+                        this.Load += new
+System.EventHandler(this.Page_Load);                   
+this.LinkButton1.Click+=new EventHandler(BtnClicked); 
+                }
+                
+                private void BtnClicked(object sender, EventArgs arg)
+                {
+                        Session["MAVALEUR"]="COUCOU";
+                        
+                } 
+                #endregion 
+        } 
+} 
+
+
+
+<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" 
+Inherits="WebApplication1.WebForm1" %> 
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
+<HTML> 
+        <HEAD> 
+                <title>WebForm1</title> 
+                <meta name="GENERATOR" Content="Microsoft Visual Studio
+.NET 7.1"> 
+                <meta name="CODE_LANGUAGE" Content="C#"> 
+                <meta name="vs_defaultClientScript" content="JavaScript"> 
+                <meta name="vs_targetSchema" 
+content="http://schemas.microsoft.com/intellisense/ie5"> 
+        </HEAD> 
+        <body MS_POSITIONING="GridLayout"> 
+                <form id="Form1" method="post" runat="server"> 
+                        <asp:LinkButton id="LinkButton1" style="Z-INDEX:
+101; LEFT: 168px; 
+POSITION: absolute; TOP: 88px" 
+                                runat="server" Width="112px" 
+Height="16px">LinkButton</asp:LinkButton><INPUT style="Z-INDEX: 102; LEFT: 
+272px; WIDTH: 240px; POSITION: absolute; TOP: 208px; HEIGHT: 24px" 
+                                type="hidden" size="34"> 
+                        <asp:HyperLink id="HyperLink1" style="Z-INDEX: 103;
+LEFT: 176px; POSITION: 
+absolute; TOP: 120px" 
+                                runat="server" Width="152px"
+Height="24px">HyperLink</asp:HyperLink>
+                        <asp:Label id="lblTest" runat=server></asp:Label> 
+                </form> 
+<br>


More information about the mono-bugs mailing list