.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to display users and number of users online

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net

We have implemented the ASP membership and roles..and we would like to display the users currently logged in and also display the number of users online so we can display that on the page. The list of users woudl only be available to our admins. BUt the number of users will show for everyone.



View Complete Post

More Related Resource Links

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






Display 'Top Queries Over Previous 30 Days' to users


In the Site Usage Reports, there is a section for 'Top Queries Over Previous 30 Days'. I would like to display this information to users. 

Is there a existing webpart for this? 
Is the data stored in a list that can be used for this purpose?


Steve Clark

Page View Count And Users Online

Hello forum I have a couple of questions.  How do I go about tracking the number page views for my web page in a sql table?  Secondly, how do I track the number of users currently online? Any help will be greatly appreciated. Thanks  

Online users

i want to display the number of current online usesrs of the website

Incorrect number of users reported in SharePoint Usage Logs

* See last post - issue appears related to KB 969231 *   It seems SharePoint 2007 usage logging with anonymous access worked in IIS6 but not IIS7. Is there a way to fix it?   Background: The SharePoint Usage logging was working fine (approximately 20,000 hits per day) until the upgrade to a new IIS7 environment. The configuration in both environments is very similar (both Anonymous Access and Windows Authentication are enabled) however the new environment is only showing 600 hits per day.   This forum response from Cornelius J. van Dyk [MVP] suggests that Usage analysis/logging with Anonymous Access doesn't work, however it does work in our old IIS6 environment (a dash "-" is just shown in the usage logs which suggests an anonymous user): http://www.eggheadcafe.com/software/aspnet/29823445/sharepoint-doubt-is-there-any-way-to-find-out-how-many-users-have-logged-in-to-the-sharepoint-site.aspx   So I've concluded it's differences in IIS6/IIS7 authentication. Reading articles on the differences (e.g.  single auth pipline instead of two-stage) doesn't highlight any obvious reasons why this wouldn't work.   Any help would be greatly appreciated.   Thanks,   Peter

Count the number of users per web page


Hello everyone,

I have a website that has 10 aspx pages in it, and I'm trying to count how many users are on any one page at a time, and display that number on the web page.  I have set it up to use an Application object ("TotalViewers"), and initialize it to 0 in the Application_Start event handler of the global.asax file.  My reasoning (probably way off base) is to increment the count on each page load, and then decrement the count on each page unload.  The increment part works ok, but when I add the code in the page unload event handler to decrement, it seems that Unload happens before the Page is presented to the client, so the  value always stays the same (adds one in page load, subtracts one in page unload).

How else  can I track number of users on each page?  (simply, becuase I am still a beginner).  I have already done some google searching and haven't come up with anything useful. 

All my pages are being navigated via a TreeView control.

Thank you,





Hide / display page layout columns for different users


I'm looking for a way to hide some columns of a page layout so they will be shown only to specific audience (for example hide the "created by" column so some users won't see it). Any suggestions?


Gridview display users and personal profiles



I am trying to populate a gridview control to display the current registered users on the site.

I query various tables from the ASPDOTNET.mdb database in order have a list comprising of UserNames, Email address, LastLoggedOn, etc. This bit is fine and it displays all the details.

The part I'm having a problem with, is I would like to add the FirstName and LastName to each row also. But I'm not sure how to get at the record. In the profile table I have a column with this detail within plus other personal details but I only need to retrieve the names and display that in the gridview.

Cheers Rob.


ASP.Net version 3.5

Access Database provider ASPDOTNET.MDB

(setup exactly the same way as the sql express table structure.)



Limit number of Users accessing the WebService


I am having WSE webservice and i want to limit the users accessing the webservice for example, at a time only 50 users can use that service.

The problem here is the users can vary. We cannot predictate the users. Means, we cannot give authendication for users.

Please help

Users display as "domain\username" rather than "firstname lastname"


Hi All,

     In my new 2010 setup, I see domain\username instead of their firstname lastname in the top-right-hand corner. How and where can I set up to show firstname lastname. I apprciate your response.



Capturing MSISDN (Mobile Number) of WAP users?


Hi, I am wondering if we can capture the MSISDN number of users surfing into our mobile sites using their mobile phones/pdas? We can capture IP address using servervariables. Is there any way of capturing the MSISDN of mobile users? Please enlighten me, thanks a lot.

Controlling Number of Simultaneous Web Users



I have an asp.net 3.5 web application for which the client has requested that the security model allows (a licensing model) restricting the number of simultaneous users logged onto the website. I am not sure how this is achievable - I'm currently controlling membership via the AspNetSqlMembershipProvider.

Many thanks for any input.


Peter Clements

Display progress to users from code behind


I have created a custom ribbon button which assembles multiple documents into one pdf.  I used Bart X. Tubalinal's excellent example http://www.deviantpoint.com/post/2010/05/08/SharePoint-2010-Download-as-Zip-File-Custom-Ribbon-Action.aspx to create my ribbon button and action.

The process of converting word doc's to pdf and then assembling them takes some time.  I would like to display progress to the users either with the Notify or Status feature.  (It would be cool to have each document name slide across their screen with the Notify method when starting the conversion for that document).

In a nutshell the ribbon executes a command in a custom.js file.  That file compiles the id's for each document and then opens an aspx page.  that aspx page has a page load method which then converts each document into a pdf and then merges each one together to form one document.

But I believe that the aspx page that get's opened is preventing the site to update iteself with notifications.  here is the js file that i'm using:

/// <reference name="MicrosoftAjax.js" />

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Need help redirecting users to personalized page


 Hi, first timer here so be gentle.


I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.

Now they would like me to create a page specific to each user.  For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A. 

I've watched a ton of the videos but have yet to see one that covers this topic, any help would be great!!!





ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend