HOWTO: Disable ASP Session State in Active Server Pages

ID: Q244465


The information in this article applies to:
  • Active Server Pages


SUMMARY

You can improve the performance of your Web server by disabling the Active Server Pages (ASP) ASP session state. This article provides steps to disable session state from the server-side.


MORE INFORMATION

The Web server automatically creates a Session object when a Web page from the application is requested by a user who does not already have a session. The server destroys the Session object when the session expires or is abandoned. These Session objects consume valuable resources. By turning off sessions, you can improve the performance and scalability of your ASP application. You can turn off session state either for the entire Web application or for specific ASP pages.

Use the following steps to disable sessions for the ASP application:

  1. Using the Internet Information Services Manager, right-click your Web application and click Properties.


  2. On the Directory Properties tab, click the Configuration button.


  3. On the App Options tab, clear the Enable Session State option.


To disable session state for a specific ASP page, add the following tag at the top of the ASP page:

<%@ EnableSessionState=False %> 
NOTES: Session-less do not do the following:
  • Execute Session_OnStart procedures.


  • Send session ID cookies.


  • Access built-in Session objects or session scope objects created with the <OBJECT > tag.


  • Serialize execution with other session requests.


Additional query words:

Keywords : kbASPObj kbGrpASP kbDSupport kbState
Version : winnt:
Platform : winnt
Issue type : kbhowto


Last Reviewed: December 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.