State Management :: Count The Number Of Users Per Webpage?

Sep 27, 2010

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.

View 6 Replies

Similar Messages:

State Management :: Current Count Of Users On Website?

Apr 8, 2010

I would like to know if anyone knows of any way or software that will give me a count of the number of unique users to use my site in the last 5 minutes. I want to make some updates to my site during the day but I want to check to see if there is slow traffic then I can do it but if it's busy I can wait till a later time.

View 7 Replies

State Management :: Maintain Session On Of Users On A Webpage?

Oct 25, 2010

I have to maintain session of two users on a sigle page.And the path is. UserPath:

1.User logins with his credentials((We retrive their credentials from login table) .
2.He invites some of his friends for a birthday party.
3.And send an url link to share some of the gifts with them in which gifts are provided in Share.aspx page.

Invites path:

1.Invite logs in with his credentials(We retrive their credentials from invites table).
2.He is directed to go to Share.aspx and list the items he require.
3.And he logs out.

Now i have problem in maintaining session for both the user and invite. How can i maintain the session so,that the user can identify a particular invite from the list of invites an his chosen items.

View 1 Replies

Count Number Of Users Locked Out / Approved?

Aug 1, 2010

I have got the total number of registered user's and the total number of users online working without any problems after a search on here.


but I would like to expand this a little. Can any one tell me how I would display the total number of users who are approved and the total number who are locked out.

View 5 Replies

Count - Get Number Of Concurrent Users Online?

May 3, 2010

I would like to know the number of users logged into my ASP.NET 2.0 application.

Points to be considered:

1) Simplest way would be to use Application or Cache object to have the counts on Session start or end. However this would fail if there is a worker process recycle. Wouldn't it?

2) Should't make a difference whether the session is inproc/state server managed/ or SQL server managed.

3) Should preferably be seamless to a web-farm architecture.

View 3 Replies

Count The Number Of Processors In .NET 2.0 - System.Management Access Denied

Nov 11, 2010

I was using some code to try to count the number of processors in .NET 2.0:

internal static int GetNumberOfProcessors()
List<string> list = new List<string>();
ManagementClass mgmt = new ManagementClass("Win32_Processor");
foreach (ManagementObject obj in mgmt.GetInstances())
string item = obj.Properties["SocketDesignation"].Value.ToString();
if (!list.Contains(item))
return list.Count;

and it blew up like this:

[ManagementException: Access denied ]
System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) +377984
System.Management.ManagementScope.InitializeGuts(Object o) +654
System.Management.ManagementScope.Initialize() +162
System.Management.ManagementObject.Initialize(Boolean getObject) +492
System.Management.ManagementClass.GetInstances(EnumerationOptions options) +122
System.Management.ManagementClass.GetInstances() +6

This code runs fine locally on cassini, but blows up on our beta server.

View 2 Replies

State Management :: Count Clicks In The Website?

Apr 4, 2010

i need to count clicks on my website plus the pages the users are visiting.

at the moment i am using the page load and send the number of loads into a xml file, but i don't think is counting right.

i need to capture the URL and store it on the database

View 5 Replies

State Management :: Session Count Zero Between Access To Pages?

Dec 10, 2010

I am using the Session ID Manager. Now the session count is 0 between the access to pages, so I cannot access the Session variables. How do I save the value of Session variables.

View 3 Replies

State Management :: Count Query Execution / Where To Store The Counted Value

Aug 25, 2010

I have a class that being used to connect with the DB. Now I want to count how many times each web request executes the queries, but I've no idea where to store the counted value. I mean, Session wont, ViewState wont work as site also have webservices. What else I can use?

View 12 Replies

State Management :: How To Pass Values From One Webpage To Another

May 31, 2010

i need to pass the roll no from one page to another and have written the code but the code is not working

in the first page

Response.Redirect("userview.aspx?RollNo=" & TextBox1.Text)

then in the target page

dim rollno1 as string
Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

View 14 Replies

State Management :: How To Create Each Visitor To A Webpage

Jun 20, 2010

whenever any internet user visit any site on the world wide web, a session is created by the site for that useram i right? or is the session created by the iis on webserver?and this sessionwhat is it, yes i know session variables and how used them, but never understood what is this sessionwhat information does it have

View 6 Replies

State Management :: Can Pass A Textbox Value To Next Webpage In C#

Oct 14, 2010

I have some vales in my web page which i want to pass into my next pasge for further work.

how to find out a good method to pass my textbox values to next opening window.

View 5 Replies

State Management :: Only Certain Webpage Hit Timeout Expired?

Apr 16, 2010

now i need to test on a website, which i able to login to the main website and some of the sub-website or sub page. but when i click on 1 of the link to link to the page. it always show me Timeout expired.

I already try to restart the IIS admin service and make sure my database is up and connected.

now i test on my development server. so the website i browse is at localhost.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

The error i get as below. hopefully get some idea to solve this issue.

Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +862234
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739110
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188


View 10 Replies

State Management :: Toal Number Of Visitors.

Sep 11, 2010

How could i get the total number of visitors of my website?

View 3 Replies

State Management :: Session Getting Shared Among Different Users?

May 19, 2010


Above is my configuration.

Because one user is getting the session values of other users due to some reason that I dont know .

View 3 Replies

State Management :: IIS Keeps Users Logged In Forever

Apr 22, 2010

I have created a simple website in using forms authendications but when I publish my website in IIS 6 on a Windows Server 2003 machine it keeps the users logged in for ever even though I have set the web.config to expire after 30 min. My website has 2 pages a login.aspx and a home.html. When I run the website in my development machine using the ASP.NET Development Server I have no problem the website works as expected meaning the users can not access the home.html unless the have been authendicated by the login.aspx page.

Also once loged in, after clearing the browser cookies the web site asks for login again which is again the behavior that I am trying to accomplish. However once the website is on IIS does not take in account the authendication that I have set up on my web.config. What is overriding my web.config? Do I need to make some changes to the global configuration of IIS?

View 2 Replies

State Management :: Conflicting Data Between Different Users

May 4, 2010

i'v an enquiry form, user is operator as Role users fill enquiry form (enquiry.aspx) and view enquiry list done by thmselvs in viewEnquiry.aspx page in GridView im testing using different users accssing this application same time The Problem:

user1 has done 10 enquiries, and in viewEnquiry.aspx able to see is 8 enquiries the 2 remaining enquiries is reflecting in user2's profile or (in viewEnquiry.aspx page as logged in user2) what i'v done: i'v used "public static string UserName;" in Global class file clGlobal.cs in App_Code when user done login successful i stored UserName = dr.GetValue(2).toString(); and clGlobal.UserName = "" on Logout and on master page Load of User im checking (if clGlobal.UserName == "") then redirct to Login.aspx

View 1 Replies

State Management :: Different Session Timeouts For Different Users?

Jun 22, 2010

I are building a web application which will be deployed to Windows Azure. I want user to set session timeout value which will be stored in Database. Currently I am aware of Web.Config method to set session timeout. i.e.

mode ="InProc"
timeout ="60"></sessionState>

Is there any method to set session timeout value according to User's Preference?

View 5 Replies

State Management :: 2 Users Getting The Same Page Instance?

Aug 3, 2010

We have a problem when 2 users from different machines click on button to open the same modal window at the same time from the same page, they see the same data, which are not suppose to be.

i do my checks and see that they are getting the same page instance , i see that the page.GetHashCode and the page.SessionID is same for both users.

View 2 Replies

State Management :: Different Session Timeout For Different Users?

Jun 1, 2010

I have a default 30 min session timeout for normal users. Now i want to set 1 hour time out for admin users. Can someone guide me how to acomplish this.

View 4 Replies

State Management :: Control The Number Of Opening Session?

Jan 12, 2011

I want to control the login user to access our system. I authenticated all of users by using my own way in project. and I want to limit the number of user to access the system cncurrently. It means , We sell our project to customer as Licence software. If user buy it for three users, we will allow three conurrent login user to access the system. Our system allow our customer to create their own users as they wish. We don't want to control the user creation to use the system. but But we want to control the total no of current login user at the server as per our licence agreement . After reading some article, I see there are two main ways to control the no of users.

One way is to use the membership property in my project and then can count the number of online users by executing Membership.GetNumberOfUsersOnline Method.

If I use membership property, I think it is not ok at my project. As my understanding, the system will control the user creation if we use the memebership provider. I am not really sure whether I can use membership provider property to get my system requirement or not.


View 3 Replies

State Management :: Create A Unique Order Number

Dec 11, 2010

i am trying to create a Unique order number so i tried to use the code above but every time i enter the quite the page the number get rest.

If (ViewState("counter") Is Nothing) Then
ViewState("counter") = 1
ViewState("counter") = ViewState("counter") + 1
End If
OrderNum.Text = ViewState("counter")
If (ViewState("counter") Is Nothing) Then

View 4 Replies

State Management :: How To Get Total Time Of Users' Session

Apr 1, 2011

I totally have no idea on how to do this. How can I get the time everytime the user use my system. We are using AD account here so we don't have login and log out. All I want is as long as the user browse to my system whether he is working or it or not become away or any, I will record its time and save it in my database then accumulate all the time he spent in my system for admin reporting.

View 5 Replies

State Management :: Can Run A Loop Like Foreach On All Of Users Sessions

Apr 23, 2010

I am saving for each user a session with information about his current page viewing.

Each time the user is moving to a new page, I am updating the session with the new page he is right now.

Now, my question is if I can make any loop over all of my users session and answer a question like: How many users are now on page "2.aspx" for example?

View 2 Replies

State Management :: Certain Users Losing Certain Session Variables?

Mar 14, 2011

There are a couple of user's experiences session variable loss after they've clicked a confirm button and their information is email via a relay hosting server. Below, I commented exactly where the session variables get lost.

What could be causing the session variable loss? So far, this only happens to a few users.

Part of the email that gets sent out:


Web config file:


View 4 Replies

Copyrights 2005-15, All rights reserved