session error in cutechat v2

Last post 04-25-2005, 11:29 AM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  04-25-2005, 11:15 AM 6108

    session error in cutechat v2

    Dear CuteSoft Team,

    I try to implement version2 of cutechat to our portal,
    but i have the same problem as with cutechat1:
    when starting the chat i have to read the useruniquename from the
    session but when i try to enter a room it says:
    HttpContext.Current.Session == null   -->this is a debugmessage from
    me to see if the session==null...
    I had the same problem with cutechat1, as i can remenber you compiled
    a new dll for us, i think cause the chat requires the session too
    early...

    could you compile a new dll for v2 for us?
    or can i fix this problem in an other way?

    Thx for help at all,


    Johannes Resch
    mailto:[email protected]

  •  04-25-2005, 11:26 AM 6110 in reply to 6108

    Re: session error in cutechat v2

     janus wrote:

    Dear CuteSoft Team,

    I try to implement version2 of cutechat to our portal,
    but i have the same problem as with cutechat1:
    when starting the chat i have to read the useruniquename from the
    session but when i try to enter a room it says:
    HttpContext.Current.Session == null   -->this is a debugmessage from
    me to see if the session==null...
    I had the same problem with cutechat1, as i can remenber you compiled
    a new dll for us, i think cause the chat requires the session too
    early...

    could you compile a new dll for v2 for us?
    or can i fix this problem in an other way?

    i just saw that a user posted the same problem in an earlier post, you answered him that you will fix it as soon as possible... Now my annoying ;-) question: when will that fix be available?

    Thx for help at all,


    Johannes Resch
    mailto:[email protected]

  •  04-25-2005, 11:29 AM 6111 in reply to 6108

    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 as RSS news feed in XML