Редагувати

Поділитися через


HttpSessionState.Mode Property

Definition

Gets the current session-state mode.

public:
 property System::Web::SessionState::SessionStateMode Mode { System::Web::SessionState::SessionStateMode get(); };
public System.Web.SessionState.SessionStateMode Mode { get; }
member this.Mode : System.Web.SessionState.SessionStateMode
Public ReadOnly Property Mode As SessionStateMode

Property Value

One of the SessionStateMode values.

Examples

The following code example sets the mode session attribute to SQLServer in the Web.config file. For SQL Server session mode, the sqlConnectionString attribute is also required.

<configuration>
  <system.web>
    <sessionState
      mode="SQLServer"
      sqlConnectionString="Data Source=localhost;Integrated Security=SSPI"
      cookieless="true"
      timeout="30" />
  </system.web>
</configuration>

Remarks

For information about how to configure your server for StateServer or SQLServer session-state storage, see ASP.NET Session State Overview.

Applies to

See also