好像是用的webservice实同的,,不知道是不是?
IDataProviderBase是不是?

解决方案 »

  1.   

    在ForumHttpModule中的
    private void Application_AuthenticateRequest(Object source, EventArgs e)实现
      

  2.   

    在 private void Application_AuthorizeRequest (Object source, EventArgs e)中
      

  3.   

    NoFile(无文件)  ForumHttpModule在哪里呀,我怎么没看到呀?
      

  4.   

    是这一段吗?
     void Application_AuthenticateRequest(Object sender, EventArgs e) {
          UserRoles forumRoles = new UserRoles();
          forumRoles.GetUserRoles();
        }
    能不能解释一下啊?
      

  5.   

    public static UserCollection WhoIsOnline(int pastMinutes) {            UserCollection users; 
               // Read from the cache if available  
              if (HttpContext.Current.Cache["WhoIsOnline"] == null) {                // Create Instance of the IDataProviderBase    
            IDataProviderBase dp = DataProvider.Instance();  
                  // Get the users       
             users = dp.WhoIsOnline(pastMinutes);   
                 // Add to the Cache                HttpContext.Current.Cache.Insert("WhoIsOnline", users, null, DateTime.Now.AddMinutes(5), TimeSpan.Zero);    
            }       
     return (UserCollection) HttpContext.Current.Cache["WhoIsOnline"];        }
    这一段应该是定义了一个全局静态方法,用来更新缓存的用户数据,你仔细看一下人家的注释void Application_AuthenticateRequest(Object sender, EventArgs e) {
          UserRoles forumRoles = new UserRoles();
          forumRoles.GetUserRoles();
        }创建一个类,获取用户的权限吧你是在那下的这个例子?
      

  6.   

    singleflower(shifan) ( ) :
    就在WWW.ASP.NET下的呀,ASPNETFORUM是微软的模范论坛,有全部源码,和数据库文件,可惜看不蛮懂^_^.
    public static UserCollection WhoIsOnline(int pastMinutes) 定义了一个全局静态方法,用来更新缓存的用户数据,我也大体也知道,就是“读出在线用户”
    Application_AuthenticateRequest(Object sender, EventArgs e)获取用户的权限,好像也没有往数据库记录在线用户呀。
    我就是不明白,她在哪里“写入在线用户”呢?没找到地方,想学着用呀
      

  7.   

    还有,她好像把 HttpContext.Current.Cache.当APPLICATION变量在用呀,很想学学呀。高手帮帮忙呀,解释一下。