This Is My Controllers in root (Without Area):
- Home
- Members
And My Areas are:
+General
- Controller1
- Controller2
+Members
- Manage
- Member
So My Login
Action is in Members Controller (in Root) before I Add Members Area every thing is fine, but know I receive 404 error for this url
(http://MyProject.dev/members/login?ReturnUrl=%2f)
So How can I define a MapRoute to fix this problem?
Update
I try this one in Main Global.asax
:
routes.MapRoute(
"newLogMaproute",
"members/login{*pathInfo}",
new { area = "", controller = "Members", action = "Login"}
);
But there is an error: A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
And I try this:
routes.MapRoute(
"newLogMaproute",
"members/login/{*pathInfo}",
new { area = "", controller = "Members", action = "Login"}
);
but this one returned 404.