I use the SQL session state in my application, however, given that we already have several connection strings, it would be easier to maintain the configuration if all the connection strings were saved, well, in <connectionStrings>.
My question is: is it possible to somehow specify an existing connection string in the configuration sessionState?
<connectionStrings>
<add name="ConnString1" connectionString="data source=xx;Initial Catalog=zzz;"
providerName="System.Data.SqlClient" />
<add name="EFConnString"
connectionString="metadata=res://*/EF.csdl|res://*/EF.ssdl|res://*/EF.msl;provider=System.Data.SqlClient;provider connection string="data source=xxx;initial catalog=yyy;App=EntityFramework""
providerName="System.Data.EntityClient" />
<add name="SessionStateConn" connectionString="data source=xx;Initial Catalog=zzz;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<sessionState mode="SQLServer"
sqlConnectionString="**SessionStateConn**"
sqlCommandTimeout="30" customProvider="" ... etc
</sessionState>
source
share