Git Product home page Git Product logo

Comments (5)

anorborg avatar anorborg commented on June 8, 2024

I think I may have had the same issue. I did a pull request #27 .

from mvcdonutcaching.

tubededentifrice avatar tubededentifrice commented on June 8, 2024

I don't think it's the same issue, because you solved a "duplicate key exception" (as you state, btw), but I'm having a "Null reference exception".
To be honest I've investigated this because it was only happening with dumb spiders.

from mvcdonutcaching.

anorborg avatar anorborg commented on June 8, 2024

Sorry about that, I didn't read in detail. I actually have gotten the null reference exception too, and it was with a spider. Since it crawls, I assume the issue is probably in the first two lines:

var actionName     = context.RouteData.Values["action"].ToString();
var controllerName = context.RouteData.Values["controller"].ToString();

Spiders tend to break up a url so there may be some cases were an action isn't defined with he request (i.e http://myurlroot.com/somecontroller/someaction exists in a sitemap, a crawler may try http://myurlroot.com/somecontoller and if a default action isn't defined the value may be null in routedata). It would probably be best if the code checked for null on these route values. Short of that though, you could possibly look over your routes and my sure default actions are defined on all of them.

from mvcdonutcaching.

tubededentifrice avatar tubededentifrice commented on June 8, 2024

I think this is a duplicate of #19 (I don't know what #19 is closed since the issue remains).
The reported line seems wrong in my stack trace since there is no line 220 in https://github.com/moonpyk/mvcdonutcaching/blob/173519a3d89ef28a09cb2ae45df9a34c4438b716/DevTrends.MvcDonutCaching/KeyGenerator.cs ; and line 43 as reported on issue #19 can't thrown a null reference exception (maybe the line 36? would be fixed with a simple x.Key != null && ...?)

from mvcdonutcaching.

moonpyk avatar moonpyk commented on June 8, 2024

I just uploaded a new release candidate of the package on nuget.org

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.