SQL Server Registration Tool

Requirements

The following list outlines the recommended hardware, software, network infrastructure, and service packs that you need:
  • Microsoft Windows 2000 Professional, Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, or Microsoft Windows XP
  • Microsoft .NET Framework
  • Microsoft Internet Information Services (IIS)
  • Microsoft SQL Server

Modify the Web.config File of Your Application

To implement ASP.NET SQL Server mode session state management, you must modify the element of your application's Web.config file as follows:
  1. Set the mode attribute of the element to SQLServer to indicate that session state is stored in SQL Server.
  2. Set the sqlConnectionString attribute to specify the connection string for SQL Server. For example:

sqlConnectionString="data source=MySQLServer;user id=;password="

Note The user, , must have permissions to perform this operation on the database.

The modified element should appear as follows:


mode="SQLServer"
sqlConnectionString="data source=127.0.0.1;user id=;password="
cookieless="false"
timeout="20"
/>

Note Ensure that you use the correct case when you specify the element and the associated attribute values. This code is case sensitive.


Troubleshooting


  • If entries in the ASPStateTempSessions table are not removed after the related sessions expire, make sure that the SQL Server agent is running. You can implement this functionality through stored procedures that are scheduled through jobs in SQL Server. The SQL Server agent manages these jobs.
  • When you use the default InstallSqlState.sql and UninstallSqlState.sql script files to configure ASP.NET SQL Server mode session state management, note that these files add the ASPStateTempSessions and the ASPStateTempApplications tables to the tempdb database in SQL Server by default. Furthermore, if you restart SQL Server, you lose the session state data that was stored in the ASPStateTempSessions and the ASPStateTempApplications tables.For additional information about how to run alternative scripts to configure persistent SQL Server session state management so that the session data is not lost when you restart the serve

Monday, April 13, 2009

0 Comments: