Git Product home page Git Product logo

Comments (10)

moonpyk avatar moonpyk commented on June 8, 2024

We need more details to investigate on this issue.

from mvcdonutcaching.

JohanAlkemade avatar JohanAlkemade commented on June 8, 2024

We are experiencing the same. For now I can only add that we see that if you refresh the page the problem disappears. Maybe we are experiencing a different bug, but seems to me it's related. I try to get some more details. We are using the library in a webfarm like environment where we have set the machinekey to be the same on all the machines.

from mvcdonutcaching.

JohanAlkemade avatar JohanAlkemade commented on June 8, 2024

I couldn't reproduce this, but after looking at the code it might be a threading issue.
In the ExecuteCallback (which is stored in the HttpContext), the library uses a variable "cachingWriter" which is set as the output writer before the result is executed. The code results in a closure.

Now I don't know how .NET compiles closures, but could it perhaps be that if one thread calls the cachingWriter.toString() and another thread just created a new cachingWriter, the first call results in a empty string as it is a new StringWriter?

from mvcdonutcaching.

moonpyk avatar moonpyk commented on June 8, 2024

I don't what to answer actually, in normal conditions ASP.NET MVC handles each request on a separate thread and sticks to it. If it's not the case, I clearly don't know what to do.

from mvcdonutcaching.

YodasMyDad avatar YodasMyDad commented on June 8, 2024

I'm guessing in this case, that this project won't work when using Async Controllers in MVC4 onwards?

http://www.codeguru.com/csharp/.net/net_asp/mvc/creating-asynchronous-actions-in-asp.net-mvc.htm

from mvcdonutcaching.

moonpyk avatar moonpyk commented on June 8, 2024

We don't have any update on this, we have projects using async controllers in production, who, of course make use of MvcDonutCaching with no problem.
Added that, since MVC4 all controller internal infrastructure is async by default.

from mvcdonutcaching.

YodasMyDad avatar YodasMyDad commented on June 8, 2024

Fantastic :) This is an excellent project.

from mvcdonutcaching.

Sebosek avatar Sebosek commented on June 8, 2024

Actually we have similar issue - sometimes is page just empty.
Should we rewrite controller actions to async, or why @leen3o mention it?

from mvcdonutcaching.

Jogai avatar Jogai commented on June 8, 2024

I had it too. Running on azure. Problem is, the status code is still OK, so my monitors dont alert me...

from mvcdonutcaching.

jecabana avatar jecabana commented on June 8, 2024

In my case I found that removing this line fixed my issue,
"ControllerContext.RequestContext.RouteData.Values.Remove(value.Key);"
there should be some problems removing values from ControllerContext.RequestContext.RouteData that cause that the page become a blank page without throwing any error.
PD: If you add the removed value after removing it, that also fix the issue, like this
ControllerContext.RequestContext.RouteData.Values.Add(value.Key, value.Value);

from mvcdonutcaching.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.