session跟dictionary?这2个东西根本不挨边好吗??
另外说下.百度好像提供这个服务.就是不谢代码直接引用JavaScript就可以了.然后客户端好像是有工具.

解决方案 »

  1.   


    直接用人家的把,比如在线QQ,TQ!!!
      

  2.   

     ——————————怎么不靠边都可以保存用户状态的;区别就是 dicionary 页面刷新后 状态就I丢失了 session 一直在,但是我不清楚 用session的话 如果多用户咨询 会不会冲突;存到数据库的话,担心频繁操作数据库 给数据库带来压力
      

  3.   

    我研究了下 发现 不能用session 我这里是 1对多的关系 ;我要获取 当前所有 进入咨询的用户列表;目前是这样搞的   private static Int32 _timeout = 50 * 1000;        private static ReaderWriterLock rwl = new ReaderWriterLock();        public static Dictionary<int, ChatInfo> dictChats = new Dictionary<int, ChatInfo>();        public static List<ChatInfo> Chats = new List<ChatInfo>();        public static void Add(ChatInfo chat)
            {
                rwl.AcquireWriterLock(_timeout);            Chats.Add(chat);
                dictChats.Add(chat.ChatID, chat);            rwl.ReleaseWriterLock();
            }
    --------请问这么搞 有什么弊端,存到数据库 会不会好些呢