0
votes

We are using sql server for session state and here is the web.config entry:

<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=MyServer;Initial Catalog=MyDatabase;user id=user;password=password" cookieless="false" timeout="20" />

We have a custom MVC site and a CMS site, both are independent projects and on dev, staging and prod, CMS site is setup as an "application" under MVC site. MVC site is the root.

Our urls look like:

http://www.domina.org (prod, load balanced, multiple servers) http://staging.domain.org (staging, load balanced, multiple servers) http://development.NAME-hq.local (development)

and CMS site urls are:

http://www.domina.org/core (prod, load balanced, multiple servers) http://staging.domain.org/core (staging, load balanced, multiple servers) http://development.NAME-hq.local/core (development)

Local development, my session is not shared since i am using built in web server and port numbers are different for both the projects.

My session is not getting shared on development site between MVC and CMS sections. however, staging and production share the session without any problem. Is it due to the way our name is for the dev site? Should i get it changed to something like dev.domain.com?

1

1 Answers

0
votes

If you're using ASP.NET 2.0 or greater you should be able to just use <httpCookies httpOnlyCookies="true"/> in your web.config.

Here is the MSDN Article http://msdn.microsoft.com/en-us/library/ms228262(v=vs.80).aspx