Online active users counter in ASP.NET
Online active users counter in ASP.NET
With this tool which is written for ASP.NET, it is possible to count the number of online users, members and guest users in web sites.
Installation
The tool installation is very simple and only takes a few minutes.
Step one - Add Reference:
After downloading the attachment, you should add a reference to the project. If you know how to add references please skip this step.
To add the reference, right click on your solution and select "Add Reference" from the menu. Then select the "OnlineActiveUsers.dll" file. Now the reference is added to the solution.
Step two - Change configuration:
Open the "Web.config" file from your project (If this file is absent, right click on your project and from "Add new item", select "Web configuration file"). Then add this code on "web.config" file.
<httpModules>
<add name="OnlineActiveUsers" type="OnlineActiveUsers.OnlineUsersModule"/>
</httpModules>
Note that this code should be placed between "system.web" tags.
Step three - Add some code to global.asax:
Open the "global.asax" file in your project (If this file is absent, right click on your project and from "Add new item", select "Global Application Class"). In the "session_end" event add this code:
OnlineActiveUsers.OnlineUsersInstance.OnlineUsers.UpdateForUserLeave()
If the project is C# the result should be like this:
void Session_End(object sender, EventArgs e)
{
OnlineActiveUsers.OnlineUsersInstance.OnlineUsers.UpdateForUserLeave();
}
After now the tool will count user statistics.
Step four - Access the statics:
To get the statistics, refer to "OnlineActiveUsers.OnlineUsersInstance.OnlineUsers" variable.
Here are some of its important properties:
UsersCount: the number of all online users.
GuestUsersCount: the number of online guest users. This property works only if you have used SetUserOffline and SetUserOnline methods. These methods are explained below.
RegistredUsersCount: the number
相关文档:
最近公司需要开发一个简历导入功能,类似博客搬家或者邮箱搬家,之前抓取信息是利用火车采集器,但是简历导入功能需要用户登陆以后才能获取简历数据,无奈只好自己开发了。
首先是遇到的问题是:如何实现模拟登陆?
我们知道一般的网站都是通过Cookies来维护状态的,我抓的网站也是支持利用Cookies来验证用户的,构造一个 ......
HTTP Error 500.19 - Internal Server Error
一 首先解锁
配置错误: 不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。
出现这个错误是因为 IIS 7.5 ......
suggest.js文件(在引入suggest.js文件前需要先引入jquery-1.4.2.min.js):
$(function() {
var k = -1;
//给查询文本框绑定click keyup事件,进行这两个事件,自动查询数据
$("#FrmChangshang").bind('click keyup', function(event) {
//获取键盘操作事件代码
var keyc = event ......
Beyond File | New Company: from Cheesy Sample to Social Platform Scott Hanselman in Lagoon L on Monday at 11:30 AM The web has changed and there's a new way of thinking about your applications. You can't just write some HTML and CSS anymore and expect to be the next Twitter. Hear h ......