couchbaselabs / couchbase-aspnet Goto Github PK
View Code? Open in Web Editor NEWThis project forked from johnzablocki/couchbase-aspnet
Couchbase Asp.Net infrastructure support
This project forked from johnzablocki/couchbase-aspnet
Couchbase Asp.Net infrastructure support
I may need to pull this down to customize, but there is no license. Apachee or MIT?
The session expiration can be overwritten in CouchbaseSessionStateProviderAsync causing the session expiration to be infinite.
Configuration:
Asp.NET 4.6
couchbase-aspnet package: 3.0.0 beta 2
Couchbase Community Edition: 5.0.1 on Windows
3 Node cluster, ephemeral bucket, with 1 replica.
Default couchbase client settings.
After a failover simulation on the cluster when an Asp.NET Web session was active:
Debug: Operation for key zkdlhkxibjhyjrynekzwmnhs failed after 24 retries using vb838 from rev43677 and opaque7233. Reason: VBucketBelongsToAnotherServer
Debug: Operation for key zkdlhkxibjhyjrynekzwmnhs failed after 24 retries using vb838 from rev43677 and opaque7233. Reason: The operation has timed out.
Error: Could not retrieve, remove or write key 'zkdlhkxibjhyjrynekzwmnhs' - reason: OperationTimeout
I am in the process of migrating an old project from Log4Net to Serilog, and I noticed that the package has a dependency on Log4Net. I see that this was resolved in #93, and that other code changes that were done after 3.0 was published were also not published to NuGet. Is it possible to publish an updated package?
The examples are not all in the examples directory; move example projects into the examples directory.
Hello
Are there any plans for a new version that uses the v3 of the couchbase. Net sdk?
There is a single endpoint in HomeController that uses OutputCache. This is probably enough to demo, but it's not obvious from the ASP.NET MVC UI that there is a Time endpoint. Maybe another link in the nav would be enough to make this clear.
The example does not have any code to add anything to the session state. When i added Session["mytest"] = "Tester"; to the HomeController Index method, it throws an exception
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Source Error:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Line 151: var item = get.Value; Line 152: Line 153: if (get.Success && item != null && (uint) lockId == item.LockId) Line 154: { Line 155: item.Locked = false;
Source File: C:\Users\bbonner\Source\Repos\couchbase-aspnet2.0\src\Couchbase.AspNet\Session\CouchbaseSessionStateProviderAsync.cs Line: 153
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Couchbase.AspNet.Session.d__36.MoveNext() in C:\Users\bbonner\Source\Repos\couchbase-aspnet2.0\src\Couchbase.AspNet\Session\CouchbaseSessionStateProviderAsync.cs:153
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61
System.Runtime.CompilerServices.ConfiguredTaskAwaiter.GetResult() +26
Couchbase.AspNet.Session.d__39.MoveNext() in C:\Users\bbonner\Source\Repos\couchbase-aspnet2.0\src\Couchbase.AspNet\Session\CouchbaseSessionStateProviderAsync.cs:220
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61
Microsoft.AspNet.SessionState.d__80.MoveNext() +782
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61
Microsoft.AspNet.SessionState.TaskAsyncHelper.EndTask(IAsyncResult ar) +63
Microsoft.AspNet.SessionState.SessionStateModuleAsync.EndOnReleaseState(IAsyncResult result) +6
System.Web.AsyncEventExecutionStep.InvokeEndHandler(IAsyncResult ar) +156
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +9775168
i update my couchbase server from 4 to 5,
so i update project sdk to version 3-beta .net client and also couchbase asp.net cache
but there was error in Common.Loging.Core package, it missing one dependency
i search but can not find any workaround for this problem,
seems problem reported here
net-commons/common-logging#172
Under the MultiCluster there is a Configure method.
This method is responsible for configuring a new cluster instance and authenticate.
under ideal conditions, this method would be called once, however, it might not be the case.
https://github.com/couchbaselabs/couchbase-aspnet/blob/3.0/src/Couchbase.AspNet/MultiCluster.cs#L63
the line #63 -> var cluster = new Cluster(clientConfig);
is being called anyway and later on, if it exists in the dictionary (AddCluster(cluster, name)) - it wouldn't be added, however, it's resources aren't cleaned immediately, which can cause memory leaks.
Suggestion for a fix so a new cluster wouldn't be created each time it accessed:
var section = (ICouchbaseClientDefinition)ConfigurationManager.GetSection(name);
var clientConfig = new ClientConfiguration(section) {Transcoder = () => new BinaryTranscoder()};
if (!Clusters.TryGet(name))
var cluster = new Cluster(clientConfig);
Something's not stirring the Kool-Aid with the session state provider in a WebForms environment. It seems as if a portion of the session data is either never being stored or is immediately timing out. I'm assuming this because we typically see two entries in the console for each session, but with the new provider we're only seeing one. The observed behavior is that sessions appear to time out immediately after they are started.
I haven't had time to try and narrow down a cause for this just yet. I've used both the "section" and "inline" bootstrap strategies with a range of different config options; always ending with the same result.
The example project has a web.config with an example outputCache section, but the global.asax.cs is ignore the web.config and hardcoding localhost. This means that the example will likely fail on 5.x+ since it doesn't try to authenticate.
No matter what you set for the [OutputCache(Duration=???)] the OutputCacheProvider.Add method always receives {12/31/9999 11:59:59 PM} for whatever the Duration is.
Note: I assume that Duration maps to utcExpires, but I may be wrong :)
This is the prefix option which is currently allowed, but ignored.
The web.config in that sample project refers to CouchbaseCacheProviderAsync, when it should refer to CouchbaseOutputCacheProviderAsync
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.