473,379 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Dynamic Session State Mode inside of Web.Config

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_Conne ction=True;"/>

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

Nov 19 '05 #1
2 3422
You'll just have to manually change the section in web.config when you deploy
to different machines (Dev, QA, production, etc...).

-Brock
DevelopMentor
http://staff.develop.com/ballen
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_Conne ction=True;"/>

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


Nov 19 '05 #2
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"
/>

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Billy Jacobs | last post by:
I am having a problem with my session variable being set to Null for no apparent reason. I am declaring it like the following when the user logs in. dim objUserInfo as new clsUserInfo 'Set...
2
by: Ollie | last post by:
okay before anyone says I shouldn't use session state in a web services don't both..... I have 2 web services that both use sesssion state and share the session state between the web services,...
4
by: Nedu N | last post by:
how to make session not to time out (infinite life time)? if not possible how to increase the time out? for my application its timing out fairly very quick even though i have time out = 99999
14
by: GaryDean | last post by:
The web.config in my asp.net application, running on Server2003, has this entry: <sessionState mode="InProc" timeout="40". In IIS the asp.net State Management timeout setting is 40 for my website....
2
by: fniles | last post by:
I am using Visual Studio 2005. In my ASPX page, when I try to use Session, I got the error "Session state can only be used when enableSessionState is set to true, either in a configuration file or...
0
by: =?Utf-8?B?QmFsYWpp?= | last post by:
The issue description is as follows: Environment Windows Server 2003 SP2 Framework 1.1 Framework 2.0 SqlServer 2000 Description: The Web server hosts both Framework 1.1 and 2.0 applications....
2
by: StanB | last post by:
I came across this weird problem: 1. Session state stops working after the app is deployed to another server because IE does not accept cookies. 2. It works if cookieless="true" in the...
10
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
I've been on this for a while, and cannot figure it out. Can someone please help with this message? SessionState can only be used when EnableSessionState is set to true, either in a...
7
by: gnewsgroup | last post by:
In my asp.net 2.0 web application, in Web.config, I have timeout="30", s l i d i n g E x p i r a t i o n = "true" for the Authentication element. I suppose, this means that as long as we...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.