Formula12
Formula12

Reputation: 397

Asp.Net Core app not working with other areas

I have published this app which is still under testing. I used the asp.net core identity framework for my security. When I publish the app without adding other things like dashboard pages, everything works fine and I can route to the /Identity/Account/Manage/index page and see my profile. Now I added a new area called dashboard and created some pages like categories, tags etc. These are all in their respective folders. This is now the structure of the program
Areas
--Dashboard
---Pages
----Categories
------index.cshtml
------create.cshtml
----Tags
------index.cshtml
------create.cshtml
--Identity
---Pages
----Account

Now Ive deployed the app to this website but it doesn't go to the areas under dashboard. Even the area under identity too does not navigate again. The areas under dashboard are recognized but they just show blank when i navigate to it. You can use this password and username to login and see what im talking about. Username:OpMainControl Password:room?@awaitcash# This is the website http://www.masterlet.com After you login, you can try navigating to the usual Identity pages like /Account/Identity/Manage or /Account/Identity/Manage/changepassword. Or you use the new area i created at /Dashboard/tags and /Dashboard/categories. Ive been trying to manuever this thing for almost 5 days now with no avail. Please help!!

Upvotes: 0

Views: 487

Answers (1)

John Meek
John Meek

Reputation: 181

Do you have the Area endpoint in the startup.cs?

app.UseEndpoints(endpoints =>
        {
               endpoints.MapControllerRoute(
                name: "areas",
                pattern: " 
  {area:exists=Articles}/{controller=Home}/{action=Index}/{id?}");
               endpoints.MapRazorPages();
          });

Upvotes: 1

Related Questions