Routing issues. Identity pages. MVC App.

lsand213

Member
Joined
Sep 11, 2021
Messages
5
Programming Experience
1-3
I don't know what changed in my code to cause the areas pages to become inaccessible. Apparently it is derived from a change in the routing.
I cannot access my areas identity register or login page on my mvc app. I get the error 404. Or the response headers (post and action) just stays the same
if I try to navigate there from another page. My routing methods are attached below.


C#:
app.UseEndpoints(endpoints =>
                {
                endpoints.MapControllerRoute(
                    name: "SlugRoute",
                    pattern: "BlogPosts/UrlFriendly/{slug}",
                    defaults: new { controller = "Posts", action = "Details"
                        );

                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}"
                        );
                  }

I cannot figure out how to implement the MapControllerRoute or MapAreaControllerRouteor from the MIcrosoft docs. The docs don't explain the full syntax needed
to implement the methods.
 
Last edited by a moderator:
This is where source control saves you. Look at your source control logs and deltas to see what changed.
 
You could have use git, Mercurial, SVN, Perforce, Bazaar, etc. or just plain old backups after each major change. Oh well, I guess now you have to compare a bare bones project's routing with your current routing to see what is different.
 
That is currently what I am trying to do. Thank you for trying to help Skydiver. I am still fairly new, so the comparison is still a work in progress.
 
Make sure that you start using source control from now on. You can create a free Azure DevOps account and support is built into VS, or GitHub or various other options.
 

Latest posts

Back
Top Bottom