A
A
Alikhan2021-10-24 08:39:06
C++ / C#
Alikhan, 2021-10-24 08:39:06

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.
6174f078be869502864392.png
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 question

Ask a Question

731 491 924 answers to any question