Official Content

Specifies the SQL Server Data Store to save session data when the "Database" value is chosen as the Session State Provider.

Scope

Generators: .NET
Level: Generator

Description

This property is part of the configuration to handle session state in a web application when using "Database" as the Session State Provider

This property is configured together with the Database Table Name property

Runtime/Design time

This property applies only at design time.

Samples

To create the necessary database and table, you can use the dotnet sql-cache command. However, you must make sure that you have previously installed the dotnet-sql-cache tool globally. Otherwise, you can do it using the command:

dotnet tool install --global dotnet-sql-cache

Then you can create the database using the following command as an example: 

dotnet sql-cache create "Data Source=.\sqlexpress2019,1433;Initial Catalog=SessionDatabase;User=myuser;Password=mypassword;" dbo SessionData

Where the Data Source=.\sqlexpress2019,1433 part of the connection string corresponds to the database server name, with sqlexpress2019 as the hostname and 1433 as the port number.

This information is needed to establish the connection to the database server.

How to apply changes

To apply the corresponding changes when the property value is configured, Build any object.

Availability

This property is available since GeneXus 18 Upgrade 4.

See Also

HowTo: Configure Session State In ASP.NET Core

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant