Here's the routing config for ASP.NET Core 2.0 app:
routes.MapRoute(
"auth",
"session/{action}",
new { controller = "Session" }
);
routes.MapRoute(
"operator",
"operator/{action}",
new { controller = "Operator", action = "Index" }
);
routes.MapRoute(
"default",
"{action=Index}/{id?}",
new { Controller = "Home" }
);
And here's some page markup (_LoginPartial.cshtml):
<div>
<a asp-route="auth" asp-route-action="SignIn" class="btn btn-default navbar-btn">
<span class="glyphicon glyphicon-log-in"></span> Sign in
</a>
<a asp-area="" asp-controller="Session" asp-action="SignUp" class="btn btn-default navbar-btn">
<span class="glyphicon glyphicon-edit"></span> Sign up
</a>
</div>
And suppose I start my browser with this Url - http://localhost/operator
.
My Login links rendered like - https://localhost:44396/operator/session/signin
Why not https://localhost:44396/session/signin ? How can I make them 'absolute'? I also tried:
<a asp-controller="Session" asp-action="SignIn" class="btn btn-default navbar-btn">
<span class="glyphicon glyphicon-log-in"></span> Sign in
</a>
What am I missing?