Re: Cannot use existing session for user integration

  •  11-29-2006, 3:24 PM

    Re: Cannot use existing session for user integration

    Before you use the session, you need to check it.
     
    Your code should look like:
     
                public string GetUserUniqueName()
                {
                    try
                    {
                         if (Session["UserID"] != null)
                         {
                               Response.Write("<BR><BR>USER ID: " + Session["UserID"].ToString());
                               return Session["UserID"].ToString();
                         }
                         else
                         {
                            return "Your APP lost the session";
                         }
                    }
                    catch(Exception s)
                    {
                        Response.Write("------Error Message: " + s.Message + "--------Stack trace: " + s.StackTrace);
                    }
                    return null;
                }


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread