Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 9th, 2003, 10:35 AM
Authorized User
 
Join Date: Oct 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Global.asa & session & load balancing

Hi everybody

well the problem i have is about global.asa file.

In the company i work there is a web site in a farm, i.e., 2 or 3 servers response the requests, so how we need to have a login in the web site, we used it session variables, but there were a problem when we used load balancing with W2K AS in the farm: if a different web server responses the request the session variables were lost, so i try to investigate several solutions and i found things like instead of session objects utilize cookies but it is not so secure, or with hardware instead of software: it is a load balancer device, or buy software which solve this problem, but here in the enterprise they take care their money, another one is the client affinity but is not so efficient or LDAO with site server but it requires certain quantity of time that in the enterprise dont wanna take, so the most adequate solutions it was create a database application for maintain state user information in the web site, So i make a component with a little table with 4 fields to mantain the session active an inactive depend on the case, but i found a problem, when the user doesn´t logout and instead of this he/she close the explorer the session (it is the register in the table) is actived, so i decided use the global.asa to call a subroutine in the session_onend, this routine must create an object of the component i create and delete the register of the session, each time the user refresh a page or he/she go to another the session updates, and a session variable also, this session variable i use it like parameter to delete the register, here i put the code

sub Session_OnEnd
    dim varUserName
    varUserName = Session("username")

    dim objDestroy
    set objDestroy = Server.CreateObject("Usuario.Sesion")
        objDestroy.destroySession(varUserName)
    set objDestroy = nothing
end sub

its clear that if the session variable username is timeout the function destroySession is not gonna work, but it is the unique slution i have found, so please experts help me, i gonna be investigating what else i can do, so give me tips, code, a link to download a free component o software i dont know, well i ope u can help me.

Bye

PD I hope my english be clear.
 
Old October 9th, 2003, 10:59 AM
Authorized User
 
Join Date: Oct 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry i forgot to write that function in the component does not work when i close the explorer or i disconnect the client computer, it is the session_onend subroutine does not fires, the subroutine





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session cookies in global.asa mabelis Classic ASP Professional 7 August 4th, 2007 07:48 AM
Javascript && keeps turnig into && ayrton Pro VB.NET 2002/2003 3 June 27th, 2005 03:34 PM
Linux & KDE & C++ & QT & MYSQL & Kdevelop Munnnki Linux 0 January 2nd, 2005 05:41 PM
Load balancing help ramprasad_628 BOOK: Professional Apache Tomcat 3 September 2nd, 2004 03:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.