we manage a website structured in a web-farm. We have 2 machines (WEB01 and WEB02 where the application is running) under load balancer and a third server (DEV) out from the LB.
All the machines are connected with an internal LAN and all the ports are open for this connection. Server DEV has been choosen as
StateServer, his internal IP is 192.168.0.6
the session is not shared, every machine has his own session!
If I log-in in WEB01 I can navigate while the balancer move me to WEB01, but if the balancer move me to WEB02 I must re-log-in. Did I miss something? Please help me!
instead of configuring state server on your virtual server (DEV) configure the state service on WEB01 or WEB02. And update its reference in both web.config files. It will solve your problem.
Thanks,
Zeeshan Umar ~Please Mark As Answer, one or multiple posts, which helped you. So that it might be useful for others~
but if the balancer move me to WEB02 I must re-log-in
Is your problem to do with Session or security?
Do you mean that you get a different Session object, or that your forms authentication ticket is no longer valid? Obviously, the state server has nothing to do with security.
simovinci
Member
2 Points
2 Posts
Web-Farm - Balancer - Can't Share Session with StateServer mode
Feb 09, 2012 01:17 PM|LINK
Good moorning,
we manage a website structured in a web-farm. We have 2 machines (WEB01 and WEB02 where the application is running) under load balancer and a third server (DEV) out from the LB.
We followed these instructions http://msdn.microsoft.com/en-us/library/ms178586(v=vs.100).aspx
All the machines are connected with an internal LAN and all the ports are open for this connection. Server DEV has been choosen as StateServer, his internal IP is 192.168.0.6
Both web.config have the following configuration
On StateServer we activated ASP.NET State Service correctly, we edited the registry key
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\aspnet_state\Parameters
setting to 1 the value AllowRemoteConnection
The sistem does not display any kind of error BUT
the session is not shared, every machine has his own session!
If I log-in in WEB01 I can navigate while the balancer move me to WEB01, but if the balancer move me to WEB02 I must re-log-in. Did I miss something? Please help me!
We also try to follow this guide but nothing changed: http://support.microsoft.com/kb/325056/en-us
I'll wait news from you.Thanks a lot. Best regards.
Simone
sirdneo
All-Star
15171 Points
2509 Posts
Re: Web-Farm - Balancer - Can't Share Session with StateServer mode
Feb 15, 2012 04:16 AM|LINK
simovinci,
instead of configuring state server on your virtual server (DEV) configure the state service on WEB01 or WEB02. And update its reference in both web.config files. It will solve your problem.
Zeeshan Umar
~Please Mark As Answer, one or multiple posts, which helped you. So that it might be useful for others~
simovinci
Member
2 Points
2 Posts
Re: Web-Farm - Balancer - Can't Share Session with StateServer mode
Feb 17, 2012 07:43 AM|LINK
Thank you for your reply,
We moved the state service on WEB01 configuring web.config like this:
WEB01:
stateConnectionString="tcpip=127.0.0.1:42424"
WEB02:
stateConnectionString="tcpip=192.168.0.1:42424"
We tried to delete alla temporary IIS files,
but unfortunately nothing changed, every machine has his own session.
Is there something else we can do?
Thanks
DMW
All-Star
15943 Points
2353 Posts
Re: Web-Farm - Balancer - Can't Share Session with StateServer mode
Feb 20, 2012 08:43 AM|LINK
Is your problem to do with Session or security?
Do you mean that you get a different Session object, or that your forms authentication ticket is no longer valid? Obviously, the state server has nothing to do with security.
Dave