Answer the question
In order to leave comments, you need to log in
Error when using UseMvcWithDefaultRoute in ASP .NET Core MVC?
I use the function call inside the Configure method in Startup.cs useMvcWithDefaultRoute
.
But on startup it gives an error.
The error says to try adding the following code to the ConfigureServices method in Startup.cs:
But after that, an error still occurs (underlined in red, although the correct namespace is included).
What to do guys? Without calling this function, when the site starts up, a 404 error is generated and nothing is displayed. MvcOptions.EnableEndpointRouting = false;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question