Skip to content

Using MapDynamicControllerRoute("{**path}") throws NullReferenceException: #658

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

Closed
alienwareone opened this issue Sep 3, 2020 · 2 comments

Comments

@alienwareone
Copy link

I've attached a test project:
https://github.com/alienwareone/DynamicEndpointRoutingApiVersioningBug

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.AspNetCore.Mvc.Routing.ApiVersionMatcherPolicy.TrySelectApiVersion(HttpContext httpContext, CandidateSet candidates)
   at Microsoft.AspNetCore.Mvc.Routing.ApiVersionMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates)
   at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
   at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
@commonsensesoftware
Copy link
Collaborator

This is a duplicate of #600. I have a large number of fixes in the works. The will be included in the next patch version. The fix is pretty straight forward - fortunately. Thanks.

@commonsensesoftware
Copy link
Collaborator

This issue has now been fixed in 5.0.0-RC.1. The official release will likely occur after 2 weeks of burn-in. If that doesn't fix the issue, feel free to reopen this issue or open a new one. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants