Comments (5)
I think I may have had the same issue. I did a pull request #27 .
from mvcdonutcaching.
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.
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.
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.
I just uploaded a new release candidate of the package on nuget.org
from mvcdonutcaching.
Related Issues (20)
- help,if custom RouteConfig,the 'area' parameter not work in asp.net mvc HOT 5
- Sometimes application cache throws System.Web.HttpException HOT 2
- Clear cache with return View doesn't work HOT 1
- FileResult getting corrupted
- Server crash on creating cache item
- MvcDonutCaching doesn't work on ChildActions? HOT 5
- Cache expiry policy
- Missing null check in KeyGenerator.cs HOT 2
- Not working with route attribute
- abstract controller class derived as regular controllers in two different areas hits same cache
- Filtering is not allowed. While implementing Donut Caching.
- getting "Object reference not set to an instance of an object" while generating a key HOT 1
- cache only non-authenticated pages HOT 2
- Serialization error when trying to pass model object to child action using action method extension of Donutcache HOT 1
- unnecessary Comments were adding HOT 2
- Order of route values shouldn't impact key built HOT 1
- Can i change input database of mvcdonutcaching?
- RemoveItems does not pass routeValues to build the key causing RemoveItems to fail
- Cache profile Server, but still different results on different browsers/machines
- Asp.net Core Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mvcdonutcaching.