I would like to use couchbase as session provider. I am not a developer and don’t have visual studio.
The idea is to reconfigure the existing application to use the couchbase-session provider instead of the DefaultSessionProvider. If I understand correctly that should be possible without changes in the code, right?
I am stuck now at the point, where I want to install the Client on the webserver.
I think I have to install the NuGet packages couchbaseaspnet.1.2.3 and CouchbaseNetClient 2.2.6.
How do I do that? Is it enough to extract the .dll files and install them with gacutil in the global assembly cache? I tried with the nuget.exe utility, but that seems to not really install the packets, even when there is an option “install”.
Typically, you would open the project in Visual Studio and use the NuGet package manager to add the dependency, update the App.Config so that ASP.NET knows to use the Couchbase Session Provider and then build and deploy the output. When you add the NuGet package it will resolve and add any dependencies, such as Couchbase .NET SDK.
Couchbaseaspnet 1.2.3 only supports v1.3.X of the SDK, so you cannot use it with CouchbaseNetClient 2.2.6! However, there is a pre-release version of CouchbaseAspNet 2.0 available on NuGet. I would use newer version since the 1.3.X client has been mothballed. Please see this blog post.
This is true except you have to change the App.Config so that ASP.NET will know to use the custom session provider over the default in-memory ASP.NET one.
When moving from In-Process session provider to SQL Server, one of the things you need to think about is serialization (https://msdn.microsoft.com/en-us/library/ms178586.aspx). I.e. any objects you store in session need to be serializable (which is not the case when using In-Process). Is that also true with Couchbase as a session provider?
Yes, internally the provider uses binary serialization so your classes should have the serializable attribute along with public constructors.
@jmorris Is there anyway we can specify to the provider that we want to store the data in json format and not binary?
Not for the 1.X and 2.X versions; the 3.X version, which is in development, will allow you to store JSON.
Will this 3.x version be develop for .net framework too, or only for .net core?
@vhetet - Yes, the new ASP.NET session provider will be both .NET Framework and .NET Core compatible.
@MikeGoldsmith thanks for your reply, do you know when this new session provider will be released?
It is something @jmorris is working on but we don’t have a provisional release date yet. Hopefully early 2017 but can’t say for sure.
Sure, thanks for the info.