Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASp Session

Reply
Thread Tools

ASp Session

 
 
TheOld
Guest
Posts: n/a
 
      04-26-2007
Server: Windwos 2000
IIS: 5

Hi,
In my web application the user can't access from more pc in the
site...
Every user have a password that are stores in the session
Every time they enter in the site i check their password in the
session
i handled the session with Application:

This is my global.asa
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart
Application("ActiveUsers")=""
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now
End Sub

Sub Session_OnEnd
Application.Lock
valori=split(Application("ActiveUsers"),"#")
Application("ActiveUsers")=""
infoutente=Session("utente") & ":" & session.sessionid & ":" &
session("iputente")
for i=0 to (ubound(valori))
if valori(i)<>infoutente and i<>0 then
Application("ActiveUsers")=Application("ActiveUser s") &
"#" & valori(i)
end if
next
Application.UnLock
End Sub

</SCRIPT>

When user left the application with the logout button,
i make a redirect to this page:

<code>
Application.Lock

valori=split(Application("ActiveUsers"),"#")
infoutente=trim(Session("utente"))
if infoutente<>"" then
Application("ActiveUsers")=""
for i=1 to (ubound(valori))
if valori(i)<>infoutente then
Application("ActiveUsers")=Application("ActiveUser s") & "#" &
valori(i)
end if
next
end if

Application.UnLock

Session.Abandon
</code>

if the user doesn't use the logout button my global.asa delete
the user session

this work until the user that are in my site are 140/150,
but from the user are >180 this system doesn't work!

the session doesn't close after 5 minutes!
why?

thenk you and sorry for may english!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
How can i share asp session data with asp.net session data far asl via DotNetMonster.com ASP .Net 3 03-23-2005 05:13 AM
ASP session vs. ASP.NET session Ed ASP .Net 7 02-02-2004 04:59 AM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments