Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 concurrent users

Author  Topic 

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 08:16:45
Given that requests are made to IIS and responses sent - there is no real 'session' - what are the options for defining concurrent users?

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-16 : 08:18:02
There is one or more sessions between IIS and SQL Server. I'm not clear about what you're asking for.
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 08:30:30
Forget SQL Server I'm asking for a method of defining concurrent users in ASP.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-16 : 08:33:13
That would be the number of active sessions at any one time. Unless you turned session management off for the web site, there will always be a session for each user.
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 08:56:57
Call me pedantic but what's a session? If I open and close my browser at a particular page 10 times in 60 seconds how many sessions are there? I suspect 10 under your definition.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 09:14:32
yup. 10.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 09:14:40
Should be 1. ASP will give you a cookie with the SessionID in it. Session expire (on the ASP server) 20 minutes (by default) after the last access

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 09:27:33
so what happens if i don't allow cookies?

Go with the flow & have fun! Else fight the flow
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 09:33:24
Kristen, every time you open your browser it gets a new session, regardless of time - so 10.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 09:56:03
"so what happens if i don't allow cookies?"

You'd get a new ASP session on each page. And on, say, a shopping cart site there would be no context from page-to-page (unless the site was programmed some other way, Amazon for example includes their Session Number in the URL) and because of the lack of page-to-page context I would expect most sites NOT to recognise that you had logged in / what you had just put in your basket etc.

Kristen
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 09:56:51
"every time you open your browser it gets a new session, regardless of time - so 10."

What sort of sessions are you refering to?

ASP sessions or database sessions?

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 10:03:52
new ssession for each page? makes sense...
haven't even thought about it though.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 10:12:55
ASP sessions
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 11:04:48
OK, I've read your message more carefully now! and you are quite correct : if you close your browser your sessions will exist on the ASP server, for [say] 20 minutes, but you will have no way of reconnecting to it.

We drop a [persistent] "machine ID" cookie so we can track returning users. You've still got the problem of not knowing whether someone has really gone, or is just reading the page in their browser slowly!

We create a Session record in the database, and issue a Session Cookie (i.e. only lasts until the browser is closed). For one client we tagged that onto the end of the URL (using some Javscript to walk around the anchor collection in the DOM).

Dunno if something like that would help you?

I supose you could also use an OnBlur event on the user's browser - like, allegedly, the porn sites do! So when they leave your site, or close their browser, you could force a "log off" style communication back to your server.

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 11:14:44
wouldn't that be blocked by pop-up killers?

Go with the flow & have fun! Else fight the flow
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-03-16 : 11:21:32
thanks for that Kristen

I think it comes down to how many requests you allow over a certain time period. Unfortunately clients seem set the 'concurrent users' model.

hmmm
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 11:39:15
Is this some sort of licensing issue? ("You can have 100 concurrent users") or some means of throttling the server when it gets busy? or something else?

Kristen
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 11:39:39
"wouldn't that be blocked by pop-up killers?"

Which bit Spirit?

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 11:48:08
onblur when you close the window. like the porn sites.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 11:55:12
like the porn sites alledgely !!

Yup good point. Not used it much, but you could probably keep the user on the current window, rather than popping up another one. Redirect them to http://www.mydomian.com/ByeBye.asp, and pass the intended URL (which I presume could be captured Client Side), send a "Thanks for watching" page (and record the Log Off), and then redirect to the URL the user originally wanted to visit.

Plus you can log where you users are going when they leave!!

Kristen
Go to Top of Page
   

- Advertisement -