Since moving to Umbraco 10 (and now 11), I often get this strange error when debugging locally. I've searched in the forum and it seems like no one has reported the exact same error message.
The solution is always a good old fashioned restart of my PC, then the error goes away.
But I would really like to know why this is occuring. Has anyone perhaps more info regarding this?
System.InvalidOperationException: No controller/action found by name Render.Index
at Umbraco.Cms.Web.Website.Routing.UmbracoRouteValuesFactory.<>c__DisplayClass6_0.<.ctor>b__1()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Umbraco.Cms.Web.Website.Routing.UmbracoRouteValuesFactory.CreateAsync(HttpContext httpContext, IPublishedRequest request)
at Umbraco.Cms.Web.Website.Routing.UmbracoRouteValueTransformer.TransformAsync(HttpContext httpContext, RouteValueDictionary values)
at Microsoft.AspNetCore.Mvc.Routing.DynamicControllerEndpointMatcherPolicy.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 StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 119
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at SeoToolkit.Umbraco.Redirects.Core.Middleware.RedirectMiddleware.Invoke(HttpContext context)
at SeoToolkit.Umbraco.RobotsTxt.Core.Middleware.RobotsTxtMiddleware.Invoke(HttpContext context)
at SeoToolkit.Umbraco.Sitemap.Core.Middleware.SitemapMiddleware.Invoke(HttpContext context, ISitemapGenerator sitemapGenerator, ISitemapIndexGenerator sitemapIndexGenerator)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at Umbraco.Forms.Web.HttpModules.ProtectFormUploadRequestsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
I have been getting the same error locally every now and then. The only solution (mind you, not a proper solution) has been to:
Clean&Rebuild (works 10% of the time)
Close and restart Visual Studio (works about 20% of the time)
or restart my computer (usually solves it)
But the problem still persists and comes back after maybe 1-2 days. If anybody else knows why this is happening, or how to prevent/solve it any help would be appreciated!
I've just run afoul of this error as well. I tried cleaning & rebuilding, restarting VS, and restarting my pc, but no luck. It seemingly came out of nowhere.
Bumping this post hoping someone has any insight on this.
I'm marking this as the solution since this always works for me.
Would however still be great if someone can explain this error more in depth. I always get it when making configuration changes in appsettings, changes in startup.cs or nuget updates.
My workaround is to remove the additional project from the VS solution and start it. Then stop debugging and re-add the additional project and re-reference it. On re-start it runs correctly apart from an error with recognising the IWebHostEnvironment MapPathWebRoot function.
Stumbled on this thread after hitting this issue in v13; thanks for the tips on bin/obj clean (solved it for me).
Additional projects may play a part to this, but what I found was that I received this error after I started developing custom renderers and custom examine indexes.
No controller/action found by name Render.Index
Since moving to Umbraco 10 (and now 11), I often get this strange error when debugging locally. I've searched in the forum and it seems like no one has reported the exact same error message.
The solution is always a good old fashioned restart of my PC, then the error goes away.
But I would really like to know why this is occuring. Has anyone perhaps more info regarding this?
I have been getting the same error locally every now and then. The only solution (mind you, not a proper solution) has been to:
But the problem still persists and comes back after maybe 1-2 days. If anybody else knows why this is happening, or how to prevent/solve it any help would be appreciated!
I've just run afoul of this error as well. I tried cleaning & rebuilding, restarting VS, and restarting my pc, but no luck. It seemingly came out of nowhere.
Bumping this post hoping someone has any insight on this.
I cleaned, but then deleted the bin and obj folders in my Umbraco project, and that seemed to do the trick.
I'm marking this as the solution since this always works for me.
Would however still be great if someone can explain this error more in depth. I always get it when making configuration changes in appsettings, changes in startup.cs or nuget updates.
Do you have your solution broken up into separate code and website projects? I did - had this and a different issue.
Seems to have gone away now I've just got a single project.
Yes, I have. Can't switch to single project though. We're a large organization with many dependencies.
Good point though!
im also getting this issue, what is going on? anyone with solution to this?
Have you tried my solution above?
I had the same issue also and cleaning then rebuilding resolved the issue. Can't figure out the cause still though.
My workaround is to remove the additional project from the VS solution and start it. Then stop debugging and re-add the additional project and re-reference it. On re-start it runs correctly apart from an error with recognising the IWebHostEnvironment MapPathWebRoot function.
Since I've stopped trying to break up into different projects I've not experienced this issue again.
Try this and see if it stops for you too.
Stumbled on this thread after hitting this issue in v13; thanks for the tips on bin/obj clean (solved it for me).
Additional projects may play a part to this, but what I found was that I received this error after I started developing custom renderers and custom examine indexes.
Love it!
Thanks alot!
is working on a reply...