Answered by:
Session state not working on windows azure

Question
-
Session state not working on windows azure
Here is my SessionState settings in web.config
<sessionState cookieless="false" mode="SQLServer"
sqlConnectionString="data source=xxxxxxxxx.database.windows.net;Database=xxxxxx;User ID=testuser@m9f6otec68;Password=xxxxxxx;Trusted_Connection=False;Encrypt=True;"
timeout="20"
allowCustomSqlDatabase="true"
/>It is working properly on localhost
Wednesday, October 17, 2012 4:10 PM
Answers
-
Hi JignseshJ,
Don't use SessionState InProc, use Windows Azure Cache instead.
Hope this helps!
Best Regards,
Carlos Sardo- Proposed as answer by Carlos SardoMicrosoft employee Monday, October 22, 2012 6:07 AM
- Marked as answer by Iric Wen Thursday, October 25, 2012 9:02 AM
Monday, October 22, 2012 6:07 AM -
Jignesh,
Windows Azure Cache (preview) is free! It runs on your Web/Worker Role(s).
Best Regards,
Carlos Sardo- Proposed as answer by Carlos SardoMicrosoft employee Tuesday, October 23, 2012 6:21 AM
- Marked as answer by Iric Wen Thursday, October 25, 2012 9:02 AM
Tuesday, October 23, 2012 6:21 AM
All replies
-
Hi JignseshJ,
Can you be more specific? Or you getting errors or weird behaviors? If so, can you describe it?
Are you just using SQL Azure as your SessionState DB? Do you have a WebRole?
Best Regards,
Carlos SardoSaturday, October 20, 2012 8:53 AM -
Hi Carlos,
I did not get any error. When I checked the sql azure db session table, I did not see any session entry. I am using InProc now.
There is a one webrole.
Here is a web.config setting for session state :
<sessionState cookieless="false" mode="SQLServer"
sqlConnectionString="data source=xxx.database.windows.net;Database=SessionSqlState;User ID=xxx;Password=xxxx;Trusted_Connection=False;Encrypt=True;"
timeout="20"
allowCustomSqlDatabase="true"
/>Thank you.
Sunday, October 21, 2012 6:30 AM -
Hi,
You could take a look at using the Windows Azure Cache for session state storage. There is a walk-through on this here
http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_buildingappswithcacheservice_topic3.aspx
Regards,
Alan
Free EBook: "Windows Azure Service Bus Developer Guide" http://www.cloudcasts.net/devguide/
- Proposed as answer by Carlos SardoMicrosoft employee Monday, October 22, 2012 6:07 AM
Sunday, October 21, 2012 6:39 AM -
Hi JignseshJ,
Don't use SessionState InProc, use Windows Azure Cache instead.
Hope this helps!
Best Regards,
Carlos Sardo- Proposed as answer by Carlos SardoMicrosoft employee Monday, October 22, 2012 6:07 AM
- Marked as answer by Iric Wen Thursday, October 25, 2012 9:02 AM
Monday, October 22, 2012 6:07 AM -
Hi Carlos,
I can not use azure cache due to pricing. I know SessionsState InProc will create problem with multiple instance.
Thank you.
Jignesh
Monday, October 22, 2012 4:34 PM -
Jignesh,
Windows Azure Cache (preview) is free! It runs on your Web/Worker Role(s).
Best Regards,
Carlos Sardo- Proposed as answer by Carlos SardoMicrosoft employee Tuesday, October 23, 2012 6:21 AM
- Marked as answer by Iric Wen Thursday, October 25, 2012 9:02 AM
Tuesday, October 23, 2012 6:21 AM