0
votes

I want to know if I can store asp.net session state in azure documentdb? I remember there was a special store provider for appfabric cache to store session state (configured in web.config), and I was wondering if I can do the same with documentdb. I assume that the consistency of the collection holding the session state would have to be defined as 'strong consistency', am I right? what is the best way to store session state in azure documentdb?

Thank you very much.

1

1 Answers

0
votes

I want to know if I can store asp.net session state in azure documentdb? I remember there was a special store provider for appfabric cache to store session state (configured in web.config), and I was wondering if I can do the same with documentdb.

Firstly, I find this article that explained using Azure DocumentDB as session state store, but the information is not enough for me to create a working sample, I get error that is caused by assembly Sitecore.SessionProvider and it's dependencies issues.

Secondly, if possible, you can try to implement a custom session-state store provider to store session-state information in Azure DocumentDB. You can refer to "Implementing a Session-State Store Provider" to create a class that inherits the SessionStateStoreProviderBase abstract class and implement the required members of the ProviderBase class.

Besides, Azure Redis Cache provides a session state provider, we can use to store session state in a cache rather than in-memory or in a SQL Server database. If you can not find any Azure DocumentDB session state providers and do not want to implement your own session-state store provider, you can try to use RedisSessionStateProvider.