Search code examples
c#asp.netdotnetnuke-7

How to get the number of users in particular page of my application


I have created an application in dnn 7.4 and i want your help can anyone give an idea, How i can get the numbers of users using particular page or users there in that particular page of my website.

Thanks in advance


Solution

  • To get the real and accurate number of users currently viewing the page you need something holding a channel to the server or sending "ping of life" from the client to the server each second or so.
    You may implement it alone using AJAX or you may use framework like SignalR - see these examples:

    Get the number of users that are online using SignalR
    Tracking Online Users with SignalR