have 2 ASP.NET projects. One is an e-comerce with a user login section. The other is the user-administration section with the info of the user. I need to connect them so when I log into my first project it sends me to the second project home section calling to the controller.
I already tried adding as reference and using RedirectToRoute, but the issue is it gets me to the right controller and action but the localhost is form the first project
This is the code for my button in the controller:
public IActionResult Redireccionar()
{
return RedirectToRoute(new { controller = "Propiedades", action = "Propiedades" });
}
Is there any way to specify the localhost?
I need to connect them so when I log into my first project it sends me to the second project home section."reference" doesn't apply in this question, you need to use Response.Redirect to the page you need to jump to.
You might want to use Forms Authentication to verify your login, you can share how the two projects are verified. You need to think about security yourself.
Found an example for you: Check if the user is authorized to access the page in the returnUrl, after log in on the login.aspx page.