tags:

views:

68

answers:

2

Hi,

I have an ASP.NET MVC app and I want to add to each page a list of members online. Actually add to Master page.

Members belong to groups so I want to show all members in there groups.

So what is the best way of doing this??

Eg On session start add to a collection that is in cache object and remove it on session end in Global.asax.

Is that a reliable way?? Traffic wont be enormous.

Malcolm

A: 

Yes, you'll have to use the Application object to store it, and you could do it in the Session Start/Session End events. Add to the Application on Start, and remove on End.

Prakash
A: 

See How can I determine the number of users on an ASP.NET site (IIS)? And their info? The same approach can be used for WebForms as well as ASP.NET MVC.

Todd Smith