Hi,
We've currently got the current server set up for a site:
- Server 1: Admin System & Database
- Server 2: Public site
- Server 3: Public Site
Server 2 and 3 are managed using the Windows Network Load Balancing system. They are both running copies of the public site code.
The sites rely heavily on sessions because they work with user logins, my question is this:
How do I retain state between servers?
The web.config for the public sites currently look like this:
<sessionState mode="StateServer" cookieless="false" timeout="40" stateConnectionString="tcpip=localhost:42424"/>
Surely it's just a case of changing "localhost" to the I.P of where I want to store the session? I'm thinking of using the Database server to store session, so it would look like this:
<sessionState mode="StateServer" cookieless="false" timeout="40" stateConnectionString="tcpip=databaseserverIP:42424"/>
Would this be wise?
I've found lots of conflicting documentation on the subject and would appreciate anyone giving an insight into how they've done it before/ would do it.
Also (while I'm here!), the admin system allows you to upload images for articles. I was thinking of setting up a virtual directory on servers 2 and 3, which would point to a network share mapping to the upload directory on the admin site, is there any reason why this would be frowned upon?
Apologies for my ignorance, this is uncharted territory for me!
Thanks, Sean