MVC 6 - Regions Routing Does Not Redirect to Customized Page

I am working on "Microsoft.AspNetCore.Mvc": "1.1.2"

The structure of my project structure is below

enter image description here

The code in startup.cs is below

enter image description here

When I run my project, I am not redirected to the index page. It shows error 404. Am I missing any settings?

0
source share
1 answer

Your url should have this template (due to the configuration of your routes):

http://localhost:your_port_number/area_name

When you launch the application, your URL pattern is:

http://localhost:your_port_number

The url does not have a domain name.

Admin url, , 404 Not Found, url :

http://localhost:your_port_number/Admin

Area app.UseMvc():

routes.MapRoute("adminRoute", "{area=Admin}/{controller=Admin}/{action=Index}/{id?}");

Admin Admin Index.

+2

Source: https://habr.com/ru/post/1669805/


All Articles