Re: session error in cutechat v2

  •  04-25-2005, 11:29 AM

    Re: session error in cutechat v2

    Johannes Resch:
     
    Off cause the CuteChat2 support session .
     
    make sure the web.config have not set the <session mode="Off"/>

    But currently the page have some problem on this .
    We will fix that issue after this month .

    Here is a solution you could use now :

    1. the UserAdapter code should like this:
    public override string GetUserUniqueName(System.Web.HttpContext context)
    {
       if(context.Session==null)
            return null;//if the session is not avaiable , just return null
        //this method would be call again , and the Session would be ok now:
       return (string)context.Session["Name"];
    }

    2. add this code into the global.asax.cs :
      protected void Application_PreRequestHandlerExecute(object sender,EventArgs e)
      {
       Context.Items["CurrentCuteChatUserIdentity"]=null;
      }

    That's all .

    Hope this helps .
     
    Regards , Terry .
View Complete Thread