简体   繁体   中英

MVC can't find my Areas page

I created an Area in my application named Admin. It's pretty basic, looks like this:

  • Areas
    • Admin
      • Controllers
        • CompaniesController.cs
      • Models
      • Views
        • Companies
          • Index.aspx
      • AdminAreaRegistration.cs

When I try to view my Index page by going to /Admin/Companies, I get a "The resource cannot be found" message. I find it weird that I don't get any sort of error message.

I'm not sure what's going on here, has anyone come across this?

If you newly created Index.aspx, you need to "REBUILD" the solution or your web project. Build only compile your last changes and rebuild build everything from the scratch. I faced that problem when I started writing Asp.net MVC project.

Does it solve your problem?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM