Skip to content

Issues after upgrading to .net core 3.0 #466

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
abomadi opened this issue Oct 16, 2019 · 8 comments
Closed

Issues after upgrading to .net core 3.0 #466

abomadi opened this issue Oct 16, 2019 · 8 comments

Comments

@abomadi
Copy link

abomadi commented Oct 16, 2019

@joeaudette After upgrading to .Net core 3.0 i have found those strange issues

  • Routes with CultureSegmentRouteConstraint() are not working for other languages except for the main thread ui language. therefore im not able to add new blog items or new pages etc ..
  • Creating New Content from a template can't be saved or published HTTP ERROR 405, Detailed Error
    An unhandled exception has occurred while executing the request. Microsoft.AspNetCore.Routing.Patterns.RoutePatternException: The route parameter name '' is invalid. Route parameter names must be non-empty and cannot contain these characters: '{', '}', '/'. The '?' character marks a parameter as optional, and can occur only at the end of the parameter. The '*' character marks a parameter as catch-all, and can occur only at the start of the parameter. at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern) at Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(String pattern) at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointFactory.AddEndpoints(List1 endpoints, HashSet1 routeNames, ActionDescriptor action, IReadOnlyList1 routes, IReadOnlyList1 conventions, Boolean createInertEndpoints) at Microsoft.AspNetCore.Mvc.Routing.ControllerActionEndpointDataSource.CreateEndpoints(IReadOnlyList1 actions, IReadOnlyList1 conventions) at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.UpdateEndpoints() at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Initialize() at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.get_Endpoints() at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.<>c.<Initialize>b__15_0(EndpointDataSource d) at System.Linq.Enumerable.SelectManySingleSelectorIterator2.ToArray()&#xA; at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.Initialize() at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.GetChangeToken() at Microsoft.AspNetCore.Routing.DataSourceDependentCache1.Initialize()&#xA; at System.Threading.LazyInitializer.EnsureInitializedCore[T](T&amp; target, Boolean&amp; initialized, Object&amp; syncLock, Func1 valueFactory) at System.Threading.LazyInitializer.EnsureInitialized[T](T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory)&#xA; at Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher..ctor(EndpointDataSource dataSource, Lifetime lifetime, Func1 matcherBuilderFactory) at Microsoft.AspNetCore.Routing.Matching.DfaMatcherFactory.CreateMatcher(EndpointDataSource dataSource) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.InitializeCoreAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatcher|8_0(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task1 matcherTask)&#xA; at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)&#xA; at cloudscribe.Multitenancy.Internal.TenantPipelineMiddleware1.Invoke(HttpContext context) at cloudscribe.Multitenancy.Internal.TenantResolutionMiddleware1.Invoke(HttpContext context, ITenantResolver1 tenantResolver) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
@joeaudette
Copy link
Collaborator

I will look into this issue this weekend.

@joeaudette
Copy link
Collaborator

Fixed some issues to solve the exception but seems like endpoijnt routing has a bug.

See my post on this thread: dotnet/aspnetcore#14877

@abomadi
Copy link
Author

abomadi commented Oct 20, 2019

@joeaudette yeah this is affecting content templates as well, what a stopper :/

@abomadi
Copy link
Author

abomadi commented Oct 20, 2019

@joeaudette is this related dotnet/aspnetcore#12794 im not that familiar with routing thing but trying to figure a workaround for this case.

joeaudette added a commit that referenced this issue Oct 20, 2019
@joeaudette
Copy link
Collaborator

@abomadi it looks like the only workaround for now is to disable endpoint routing and go back to traditional mvc routing. Maybe we can try endpoint routing again after aspnetcore 3.1.

I think all those reported issues with endpoint routing are related and there is definitely bugs in it. It was a complete rewrite of the routing system. I wish they would investigate more and not close issues so casually given how much changes they made.

I've published an updated project template that now sets up projects using 3.0, but due to this issue I made it disable endpoint routing and use the traditional mvc routing for now.

@abomadi
Copy link
Author

abomadi commented Oct 20, 2019

I'll follow the changes u have made and let u know, thanks for the prompt workaround

@abomadi
Copy link
Author

abomadi commented Oct 21, 2019

@joeaudette i believe AddDefaultPageRouteForSimpleContent need to be reverted back to mvc routing too

@markidox
Copy link
Contributor

Closing due to lack of activity. Please create a new ticket if this is still an issue that requires looking into.

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

4 participants