Process Session on Azure

giang le asked on October 6, 2015 04:07

Hi all,

I have developed a website by Kentico and deploy it into IIS. I used Session to cache data on this site. Now I want to deploy this site to Azure and use load balancing. I think Session is not work on load balancing, so "How to process these Session to keep site work as normally?"

Thanks!

Recent Answers


Brenden Kehren answered on October 6, 2015 04:16

You can store session within SQL Server by creating a SQL Session database. Check out the Session-State Modes documentation.

0 votesVote for this answer Mark as a Correct answer

giang le answered on October 6, 2015 04:34

Thank Brenden,

I will try it. I have also tried to change Session to Cookies by "CookiesHelper" then decrypt them. However, sometime it is not work after I redirect from a page to other page. Can I use Cookies instead of Session?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 6, 2015 14:32

You can use cookies although they are not as secure as session is mainly because they are stored on the client side. Another option is to not use session and create a more robust object oriented solution. Creating the sql session database is pretty easy really, I'd suggest that as it can be used for multiple applications if need be.

0 votesVote for this answer Mark as a Correct answer

Bryan Soltis answered on October 6, 2015 20:14 (last edited on October 6, 2015 20:14)

You are much better off using REDIS cache for your session. it will be more salable and won't increase the size of your DB.

https://devnet.kentico.com/articles/microsoft-azure-redis-cache-in-kentico

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 6, 2015 22:57

Good call Bryan, forgot all about that!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.