1

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

Malcolm
  • 12,524
  • 28
  • 89
  • 125

2 Answers2

0

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.

aliensurfer
  • 1,600
  • 3
  • 17
  • 38
0

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.

Community
  • 1
  • 1
Todd Smith
  • 17,084
  • 11
  • 59
  • 78