Dynamic Session State Mode inside of Web.Config

B

Beach Bum

Is there a way to dynamically choose what session state server inside
of web.config similar in the way you can change options inside of the
appSettings using the file attribute of the appSettings tag? We are
using the following setup for our development machines and we would
like to use a separate Session State Server for our development
environment

Inside of web.config:
<Configuration >
<appSettings file=optional.config>
<add key=DB_ServerName
value="ProductionServer;Database=DB1;Trusted_Connection=True;"/>

Inside of optional.config (only on development machine):
<appSettings>
<add key=DB_ServerName
value="DevlopmentServer;database=DB1;uid=db_user;pwd=password;"/>
 
B

Beach Bum

I was trying to avoid this ... is there a way to use an app setting in
another part of web.config ?

for example:

<add key="StateServerMode" value="SQLServer " />
<add key="StateServerConnection" value="data source=Prod / Dev
Server;uid=User;pwd=password;" />

then use something like the following ????

<sessionState
mode= StateServerMode
SqlConnectionString= StateServerConnection
timeout="20"
/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top