Hi Richard, your concern about What could cause Login.cshtml and not Index.cshtml to open on startup
is related to how you set up your authentication mechanism.
Normally speaking, when we are working on MVC app, the home page url shall be /Home/Index
just like what you shared in your question, and if the Index
action method or the HomeController
class has [Authorize]
attribute on it, your app will redirect to the Login page when an unauthenticated request is trying to hit /Home/Index
endpoint. And we can also use custom middleware or filter to achieve the redirection.
But we didn't see any codes related to how you configure your authentication scheme. Could you please share more about your app if you didn't see any [Authorize]
attribute or suspicious middleware in your app?
One more thing, I always recognize Microsoft Identity as Microsoft Entra ID(known as Azure AD before) but it doesn't require to have a Login.cshtml within the App, I'm afraid what you had in your app shall be asp.net core Identity. Am I right?