Session Replacement in ASP (Page 1 of 5 )
An alternative to using ASP's session object is to build your own using a database. In this article Rogier shows us how...
In my opinion the session was a gift from to the development community. I really like the many things you can do with it. I find it especially handy when I develop a webapplication for which a login area is required. All the pages in the application can only be accessed by people who have proper authorization, otherwise the user is redirected to a login page. It’s simple, it’s neat, however... it cannot be used in all circumstances.
For example, consider a company that owns a load balanced web farm consisting of multiple IIS web servers. It is not advisable to use sessions here. Also consider those poor souls who do not like cookies... sessions will not work for them either.
This article describes a workaround. Since I do not start developing without first getting my hands on a database, it is very much database driven. I use SQL server as the database, complete with stored procedures.
In this article I will start with the database and work my way to the ASP code you need. I try to keep it simple. The ASP code is only for a home page, for which you need access and a login page which handles the login procedure.
Next: Creating the Database >>
More ASP Articles
More By Rogier Doekes