Application应该是全局的,所有client访问的时候都是在共享同一个,app_user也是全局静态的,看起来不应该有问题,写点日志吧,看下在那行代码出的问题~~~

解决方案 »

  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();
            }楼主  加上锁试下
      

  2.   

    为什么不用ConcurrentDictionary<T1, T2>呢