Last post Aug 13, 2019 02:19 PM by valdanio
Aug 13, 2019 08:26 AM|valdanio|LINK
what can I do to redirect user to Index HomeController page? Note: I'm using the default authetication layout of .NET CORE 2.1.
Aug 13, 2019 12:23 PM|AddWeb Solution|LINK
Not clear what you exectly want, but for my understanding after login autentication you want to redirect in dashboard like page and after logout back to login.
so, in asp.net core you can user : return this.RedirectToPage("/Home/Index");
Reference Link : full code of asp.net core with code first approch you can use only as per our current reqirement only.
Aug 13, 2019 12:24 PM|maherjendoubi|LINK
what can I do to redirect user to Index HomeController page?
services.ConfigureApplicationCookie(options => options.LoginPath = "/Home/Index");
Aug 13, 2019 02:19 PM|valdanio|LINK
Open the login.cs file under razor file and find the login action, after put this:
_logger.LogInformation("User logged in.");
return RedirectToAction("Index", "Home");