Web.Config - Session Time Out - Load Balancing

S

SMG

Hi all,

I have two webservers to run my site, with a load balancing software.

Question 1 :
I am using following setting in web.config file of both the servers.

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20" />

Is it the right way to do? Will my session will be maintained when I move
from one server to other server.
I am not storing any value in session variable, I am using only cookies.


Question 2 :
Along with the above setting, I am using following setting in web.config
the intention is if user

<authentication mode="Forms">
<forms name="test" loginUrl="login.aspx" protection="All" path="/"
timeout="20" />
</authentication>

and following code to support the above code
<location path="myFolder">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Current Scenario : After 20 minutes the page is timed out, When the page is
timed out the user is automatically redirected to login page.
Want is intended : When timedout user should be able to see the
timedout.aspx page and not login.aspx page, How do I handle it.

The help will be greatly appreciated.

Regards,
Shailesh G
 
B

Brock Allen

Question 1 :
I am using following setting in web.config file of both the servers.
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20" />

No -- change InProc to StateServer. You will then need to decide which of
your two machines will run the state server NT service. Choose that machine
and start it. Then change the 127.0.0.1 to the machine name/IP. Make sure
<sessionState> element in web.config is the same on both machines.
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top