RSS

ASP.NET Active User Count

Chris Filed Under:
Here is a quick and dirty way to track the number of active users on your site as a given time. This is implemented on SoccerXpert.com.

The implementation is simple just add the following code to the global.asax:


Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("ActiveSessionCount") = 0
End Sub

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("ActiveSessionCount") += 1
End Sub

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Application("ActiveSessionCount") -= 1
End Sub

In your master page add a reference to the session variable:

Dim ActiveSessionCount as Integer = Application("ActiveSessionCount")

Links to this post | edit post
Reactions: 

MVC Book Download from Scott Guthrie

Chris Filed Under:
Scott Guthries has a free 185 page book chapter on ASP.NET MVC that you can download for free. Info on the book can be found at : http://tinyurl.com/aspnetmvc

The chapter is available directly at : http://aspnetmvcbook.s3.amazonaws.com/aspnetmvc-nerdinner_v1.pdf

This pdf is great as it builds an application from scratch and introduces all of the concepts involved with ASP.NET MVC along the way.

I encourage you to check it out...

Links to this post | edit post
Reactions: 

ASP.NET Security Tutorial Series

Chris Filed Under:
Scott Mitchell created five more tutorials in the Security series that present creating the membership schema in SQL Server, creating user accounts, validating user credentials against the membership user store, user-based authorization, and storing additional user information. Tutorials are available in both VB.NET and C# versions.

You can see these tutorials on ASP.NET here:

http://asp.net/learn/security/

Links to this post | edit post
Reactions: