SqlServices Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Supports installing and removing the SQL Server database elements of ASP.NET features.
public ref class SqlServices abstract sealed
public static class SqlServices
type SqlServices = class
Public Class SqlServices
- Inheritance
-
SqlServices
Remarks
You can use SQL Server databases to store information for ASP.NET features such as session state, membership, Web parts personalization, and role management. These features require that the SQL Server database to which they are connected be properly configured before use. You can use the ASP.NET Register SQL tool (aspnet_regsql.exe) to do this, or you can call the static methods exposed by the SqlServices class directly from your code.
Note
Using the aspnet_regsql.exe tool or the SqlServices class to configure the database only sets up the database that the providers will use with the proper tables, triggers, and stored procedures. Configuring the database in this way does not modify configuration files to specify that these features use the SQL Providers for these services.
Methods
GenerateApplicationServicesScripts(Boolean, SqlFeatures, String) |
Generates the SQL scripts for the selected features. The scripts will reference the database indicated by the database parameter. |
GenerateSessionStateScripts(Boolean, SessionStateType, String) |
Generates the SQL script for installing or removing session state. The script will reference the database indicated by the database parameter. |
Install(String, SqlFeatures, String) |
Installs components for selected ASP.NET services on a SQL Server database. |
Install(String, String, SqlFeatures) |
Installs components for selected ASP.NET features on a SQL Server database. |
Install(String, String, String, String, SqlFeatures) |
Installs components for selected ASP.NET features on a SQL Server database. |
InstallSessionState(String, SessionStateType, String) |
Installs components for ASP.NET session state on a SQL Server database. |
InstallSessionState(String, String, SessionStateType) |
Installs components for ASP.NET session state on a SQL Server database. |
InstallSessionState(String, String, String, String, SessionStateType) |
Installs components for ASP.NET session state on a SQL Server database. |
Uninstall(String, SqlFeatures, String) |
Removes components for selected ASP.NET features from a SQL Server database. |
Uninstall(String, String, SqlFeatures) |
Removes components for selected ASP.NET features from a SQL Server database. |
Uninstall(String, String, String, String, SqlFeatures) |
Removes components for selected ASP.NET features from a SQL Server database. |
UninstallSessionState(String, SessionStateType, String) |
Removes components for ASP.NET session state from a SQL Server database. |
UninstallSessionState(String, String, SessionStateType) |
Removes components for ASP.NET session state from a SQL Server database. |
UninstallSessionState(String, String, String, String, SessionStateType) |
Removes components for ASP.NET session state from a SQL Server database. |