Configuration

Website Preparation

The following is a list of configuration items which must be done to your website to make sure it works with SessionFarm correctly. These items should all be configured through the properties page of your website from within the IIS Admin console / Internet Services Manager.

  1. Sessions Enabled: by default the built-in IIS Session object is enabled. If you have disabled it you can enabled it from the Home Directory / Configuration / Options page. Make sure that Enable session state is checked.
  2. Session Timeout: by default the IIS Session timeout is set to 20 minutes. SessionFarm reads this value and uses it for its internal timeout. On the same Home Directory / Configuration / Options page you can configure this value appropriately.
  3. Response Buffering: by default in IIS 5 response buffering is on. In IIS 4 it was set to default to off. SessionFarm requires that buffering be on—otherwise it requires that the SessionFarm call be the very first line of every ASP page. On the same Home Directory / Configuration / Options page make sure that Response buffering is checked.

Configuring SessionFarm Application Variables

SessionFarm uses Application variables to read configuration settings that determine how it behaves. These are usually set in your Global.ASA file in the Application_OnStart event.

Application(”SessionFarm_FilePath”): this variable must contain the UNC file path to the file-share where you want to store your data. If you are using SQL Server for data storage this variable must be blank.

Application(”SessionFarm_ConnectionString”): this variable must contain the connection string for your database. Applies only if using SQL Server for data storage.

Application(”SessionFarm_ConnectionTimeout”): the number of seconds that you want the SessionFarm object to wait while trying to connect to the database. By default this is 15 seconds. Applies only if using SQL Server for data storage. (Optional)

Application(”SessionFarm_CommandTimeout”): the number of seconds that you want the SessionFarm object to wait while executing stored procedures. By default this is 15 seconds. Applies only if using SQL Server for data storage. (Optional)

Application(”SessionFarm_Debug”): when set to “true” then SessionFarm will log additional information to the windows event log. (Optional)

Application(”SessionFarm_SPPrefix”): set to “dbo” or to the owner of the SQL stored procedures, if necessary. (Optional)

Application(”SessionFarm_CookieDomain”) & Application(”SessionFarm_CookiePath”) you can adjust the Domain and Path settings of the SessionFarm_GUID cookie that is created by SessionFarm. (Optional)

Error Logging

SessionFarm will log errors it encounters to the Application Event Log on your web servers. Errors will not be raised to your ASP application. Currently these settings are not modifiable.