question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current user did not login to the application

See original GitHub issue

I’m using Asp.Net Boilerplate free startup template (ASP.NET MVC 5.x, Abp v3.4.0.0)

//Directly login if possible
if (user.IsActive)
{
    AbpLoginResult<Tenant, User> loginResult;
    if (externalLoginInfo != null)
    {
        loginResult = await _logInManager.LoginAsync(externalLoginInfo.Login, GetTenancyNameOrNull());
    }
    else
    {
        loginResult = await GetLoginResultAsync(user.UserName, model.Password, GetTenancyNameOrNull());
    }

    if (loginResult.Result == AbpLoginResultType.Success)
    {
        await SignInAsync(loginResult.User, loginResult.Identity);

        //Create a personal account
        await _clientAppService.Create(new CreateClientDto
        {
            FirstName = user.Name,
            LastName = user.Surname,
            ClientType = ClientType.Personal
        });

        return Redirect(Url.Action("Accounts", "ProfileInfo"));
    }

    Logger.Warn("New registered user could not be login. This should not be normally. login result: " + loginResult.Result);
}

here register action method of account controller, i get “current user did not login to the application” error when calling app service method after SignInAsync call. Why i should get this error after SignInAsync ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
malimingcommented, Jan 31, 2020

Before calling the Create method of clientAppService.

0reactions
hidayetsoltanzadecommented, Jan 31, 2020

Works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Current user did not login to the application!" error when ...
The issue was the user was not belonging to the tenant. Used the following line to set the tenant id and code worked....
Read more >
Current user did not login to the application! - Help
AbpAuthorizationException : Current user did not login to the application! " is not the cause. The warning is usually caused by robots that...
Read more >
Abp.Authorization.AbpAuthorizationException: Current ...
Error at application After about 30 minutes of logging in, the application shows an error Current user did not login to the application!...
Read more >
Current user did not login to the application! #10556
We are getting below error while clicking on the Logout. LogoutIssue.png. Note: User is logged in successfully..if he click on Logout this ...
Read more >
Current User - ABP Documentation
It is very common to retrieve the information about the logged in user in a web application. The current user is the active...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found