This project has moved and is read-only. For the latest updates, please go here.

When we design the Homelidays Session Service, our target was to limit as much as possible the changes that needs to be done in existing ASP pages.

So to use Homelidays Session Service in your ASP code you should:

  1. Disable the IIS session state provided by IIS so that the “Session” object is no more instantiate by IIS ;
  2. Include the HomelidaysSessionServiceInit.asp file in every ASP top level page to instantiate Homelidays custom “Session” object.
    This new “Session” object has nearly the same interfaces as the IIS one so you won’t need to change your existing code.

Disable IIS Session State

By default IIS instantiate the Session object. So we will first disable this mechanism as we intend to replace the IIS Session object by ours.

On IIS 5.1 and IIS 6.0

Open the internet Information Service dialog you can find in administrative tools

IIS 5.x disable IIS Session 1

Right click your web site and click “Properties” and select the “Home Directory” tab


Click the “Configuration” button, select the “Option” tab and uncheck the “Enable session state” option


On IIS 7.x

Open the Internet Information Services (IIS) Manager and in the left panel select your web site.

IIS 7.x disable IIS Session 1

In the middle panel double click on ASP.

IIS 7.x disable IIS Session 2

Include HomelidaysSessionServiceInit.asp in ASP top level pages

In every “top level ASP page” you should include the HomelidaysSessionServiceInit.asp. We call a “top level page” any ASP page that is intended to be called by a web browser. Any ASP page that is included into an other page is not a “top level page”.

Please find the HomelidaysSessionServiceInit.asp in the installation folder of Homelidays Session Service. The default installation path is “C:\Program Files\Homelidays\SessionService”. Copy and paste it in the folder you want in your Classic ASP code.

So the first t two lines of your code should looks like:

<%@ Language=VBScript %>
<!-- #include virtual="/<The_Path_You_Want>/HomelidaysSessionServiceInit.asp" -->

Requirements are:

  1. You would need to handle manually every case when a file is directly called by users and also included in other ASP page;
  2. HomelidaysSessionServiceInit.asp should never be included twice. An error will occurs if you include twice the file;
  3. You should include HomelidaysSessionServiceInit.asp in any top level page even if the page do not use the Session variable.

This file will load the Homelidays Session Service COM component and will provide you the “Session” object with almost the same interface as the Session provided by IIS. As a consequence you do not need to change your existing code. For instance:

Session("KEY_STRING") = "Value"

Session(KEY_INT”) = 12

Dim tab(3,2,1)
tab(0,0,0) = "A"
tab(0,1,0) = "B"
tab(0,2,0) = "C"
tab(1,0,0) = "D"
tab(1,1,0) = "E"
tab(1,2,0) = "F"
tab(2,0,0) = "G"
tab(2,1,0) = "H"

Session("KEY_TAB") = tab

You can only store classic ASP base types and Scripting.Dictionary COM object in the Homelidays Session Service.

Next see how to Use the Session Service in ASP.NET code.

Last edited Aug 25, 2011 at 10:16 AM by Yanal, version 11


Yanal Nov 19, 2010 at 7:35 AM 
Done! I hope this help. Thanks for feedback

edecadoudal Nov 9, 2010 at 7:57 AM 
Any sample code would be nice here.