
184
|
Chapter 8: ASP.NET Configuration
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
<authorization> element shown in Example 8-2. Note that the <forms> element is
required only if you want to override the settings specified in machine.config.
Example 8-3 specifies a different login page (myLogin.aspx) to which unauthenti-
cated users are redirected.
Configuring Out-of-Process Session State
The <sessionState> configuration element in machine.config sets the following
machine-wide defaults:
<!-- sessionState Attributes:
mode="[Off|InProc|StateServer|SQLServer]"
stateConnectionString="tcpip=server:port"
stateNetworkTimeout="timeout for network operations with State Server,
in seconds"
sqlConnectionString="valid System.Data.SqlClient.SqlConnection string,
minus Initial Catalog"
cookieless="[true|false]"
timeout="timeout in minutes"
-->
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="20"/>
Unlike the <authentication> element, the <sessionState> element has no chil-
dren, only attributes. Like the
<authentication> element, the usage of the
<sessionState> element in machine.config contains a combination of attributes
not normally seen in practice, since the purpose of the attributes is to set