where do you save your login/password? you can try the following:
1. add a DataTable or Hashtable to an Application variable
2. when the user tries to log in, check against the DataTable/Hashtable to see if the user is already there
 a. if yes, reject the login
 b. if no, allow the user to log in and add an entry to the DataTable/Hashtable
3. when the user logs out or the session times out (in Session_End), remove the entry from the DataTable/Hashtable

解决方案 »

  1.   

    不如,在存储用户信息的表中增加一个字段IsLoged
      

  2.   

    恩,加入IsLoged 不是很明智的,并不是每个用户都是点logout退出,退出事件不好写的。而且,要对db操作,加重了系统的负荷~
      

  3.   

    to saucer(思归, MS .NET MVP):
    我把在线会员放在数据库里的一张表中
      

  4.   

    思归的方法是不是有个问题:
    如果IE强行关闭(如掉电、关机等而非logout),Session_End就不会正常执行,这个用户就不能重新登录,如果让服务器自动刷新在线列表,刷新周期又是个经验问题,且降低了性能,不知有无更好办法?
      

  5.   

    saucer
    说的很清楚了,用session
      

  6.   

    按这种思路下来,那这个session.timeout应该非常小.要不然用户一不小心退了出去,还不能马上进来。要等半天,不好用!
      

  7.   

    我一般再加上IP位置控制,同一IP位置允許無限次登錄,不同IP的話則不允許相同帳號同時登錄。
      

  8.   

    to :chinaver2002()
    如果是在局域网中公用一个IP上网怎么办??