Enable MVC in your MVC web application project, as done in the authorization server project and add Home controller. Here is the code of HomeController:
[Authorize] public IActionResult Index() { return View(); }
Configure MVC web application on port 5002.
You can configure the MVC web application on port 5002 by updating the launchsettings.json file and adding the UseUri in the WebHostBuilder object in the Program class.
Update the port to 5002 in the following entry:
"WebApp": { "commandName": "Project", "launchBrowser": true, "launchUrl": "http://localhost:5002", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }
Here is the code of the Program class:
public static void Main(string[] ...