Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hmmm...IIS might have something - in ASP directly I think your best bet (and other please chime in if you have ideas so my knowledge can grow too), is to do the following:

 

1. Have an integer that is specified to store the number of users that is stored in an application variable.

 

2. In the global OnSessionStart increment that value.

3. In the global OnSessionEnd decrement that value.

 

I think this has some down falls though but I'm not sure on them. Hopefully someone can provide better enlightenment, but this should get you started.

Posted

One downside is that you would have to wait for the session timeout before "OnSessionEnd" is called

 

This would account for the users who dont 'log out' of your application, but just close their browser.

 

This timeout is something like 20 minutes, from a musty corner of my memory.

 

This could cause a problem because you might hit your 'connection limit', even though no-one is actually "using" your application! (i.e. they all log in and then simply close their browser)

 

B.

Posted

I want limit because of licensing problem. When user buy 5 user licenses then only 5 concurrent users are allow.

 

If I want to display which user login to system,

can I store Session object in Application object?

So I can list out all the Session users.

 

What happen if the Session expires?

Will it automatic remove from Application object?

  • Administrators
Posted

Why would you want to store Session objects in the Application object? they are designed to do seperate things and this kind of defeats the whole point. If you want to track the number of users then the suggestion by bri189a above is about the best you can do, but as penfold69 pointed out if users fail to logout correctly then the sessions will remain for up to 20 minutes by default.

Too be honest web applications just aren't designed for this kind of concurrent user licensing model.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

  • Administrators
Posted

The method that has been suggested before is about all you can do - track the session start / ends and manually keep track, provide your users with an option to logout. If they do not manually logout then they are likely to have problems as the session will be live for 20 minutes.

Ultimately this is not how web applications are designed to work, concurrent user monitoring is just not something http / web apps are expected to do.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...