-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null reference exception #26
Comments
I think I may have had the same issue. I did a pull request #27 . |
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". |
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:
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. |
I think this is a duplicate of #19 (I don't know what #19 is closed since the issue remains). |
I just uploaded a new release candidate of the package on nuget.org |
It recently appeared, not really sure why. The error is random (impossible to reproduce), so probably it's a race condition or browser related. I'm unable to reproduce the error myself. I got 14 occurences accross only 3 IP, all having "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" as user agent and very strange post data (see below).
It's not a big issue (nasty spider), but the exception shouldn't be thrown away.
The text was updated successfully, but these errors were encountered: