Base solution for your next web application
Open Closed

Go to application when user authorized #1683


User avatar
0
vitaly created

Hi Halil,

How to change behavior - if user authorzied - don't show front end page and redirect to application right away?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can check AbpSession.UserId in HomeController's Index action. If it is bigger than 0, redirect user to ApplicationController's Index action.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    vitaly created

    Could you give an example, please

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Change your HomeController's Index action to

    public ActionResult Index()
    {
        if (AbpSession.UserId > 0)
        {
            return RedirectToAction("Index", "Application");
        }
    
        return View();
    }
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    vitaly created

    Got it. Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)