If you are trying to run the container in Visual Studio using Docker Compose, you need to run on Release.
You need to check the application logs in order to diagnose the problem but since the container has shut down immidiately, it seems you can't.
run docker ps -a
to see your exited container. Sample image below:
Create new image based on stopped container:
Overwrite entrypoint to get into the new container:
Remove the image with docker image rm debug/ubuntu when you are done.
Follow these steps to navigate into Log folder for logs.txt in your application to see the error.
You need to build all project references. If you have downloaded the framework, there is a build folder. try running build-all.ps1
.
I wouldn't suggest substituding default identity tables (AspNetUsers) with abp identity users (AbpUsers). Since AbpUsers have extra fields for audit fields, extra-properties and multi-tenancy than default identity users.
You may need to update default Identity repositories as well not to mention loosing the ability to use Object Extensions.
Instead, i would suggest transferring/converting data. It should work just fine.
Maybe you forget to run DbMigrator to apply the migrations?
Try setting AccessTokenLifetime (or also IdentityTokenLifetime if you need) to 15*60 (token values are in seconds).
If you are using hybrid/authorization code flow and using refresh token; also set AbsoluteRefreshTokenLifetime to 15*60.
Error indicates that it can't find GenieERPBlazorAzutoMapperProfile.cs under Volo.Abp.Account.Pro.Admin.Blazor
.
Can you check Volo.Abp.Account.Pro.Admin.Blazor
project? Default should be:
<br>
namespace Volo.Abp.Account.Pro.Admin.Blazor
{
public class AbpAccountAdminBlazorAutoMapperProfile : Profile{
public AbpAccountAdminBlazorAutoMapperProfile()
{
}
}
Did you or suit replaced this file?
You need to scaffold the database and integrate efcore (or mongo) to that dbcontext. You can check ef-core integration docs.
Surely,
In OnGetExternalLoginCallbackAsync
method, there is a code piece where user is created then signed in:
<br>
...
var externalUser = await CreateExternalUserAsync(externalLoginInfo);
await SignInManager.SignInAsync(externalUser, false);
...
Add identity settings control between: <br>
var externalUser = await CreateExternalUserAsync(externalLoginInfo);
if (await CheckRequiredIdentitySettings()) // Checks SettingManagement for RequiredConfirmedEmail or RequiredConfirmedPhoneNumber
{
Logger.LogWarning($"New external user is created but confirmation is required!");
await StoreConfirmUser(externalUser); // Stores data for confirmation page
return RedirectToPage("./ConfirmUser", new // Redirects to confirmation page
{
returnUrl = ReturnUrl,
returnUrlHash = ReturnUrlHash
});
}
await SignInManager.SignInAsync(externalUser, false);
Here is the CheckRequiredIdentitySettings
method:
<br>
private async Task<bool> CheckRequiredIdentitySettings()
{
var requireConfirmedEmail = await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedEmail);
var requireConfirmedPhoneNumber = await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedPhoneNumber);
return requireConfirmedEmail || requireConfirmedPhoneNumber;
}
Hello @riley.trevillion,
I understand your issue that, when the external user is loggin in for the first time; new external user is created and logged in immidiately when even identity settings required email/phone is selected.
I reproduced the problem and fixed the issue. It should be available in the next 4.3 patch release.
Hello @MarekH,
The sample you shared is not a microservice template. It is a tiered application. You can check microservice docs about abp microservice template.
In this concept, your question is not related with microservices.
We have tried it with using IdentityUser insted of AppUser , But still we are not able to access any repoostories. As mentioned above we have a API Project Name : Microservice , We are trying to access database of tenant to perform CRUD Opration from the same project.
Issue: We are not able to switch or access any reporsitories in that Project
I have created a DEMO Project with the Microservice Project (In which we would like to access tenant database and perform CRUD oprations).
The solution you have provided is a tiered application and has an extra api project named Microservice. So you have 3 different web applications:
You are not trying to perform CRUD operations in the same projects, they are all diferent projects. You are just using the same solution. That is the big difference you may be missing out.
Again, this is a concept of distributed systems: You may have different applications signing in to same IdentityServer and applications communicate each other via using the token they get from identity server.
It doesn't matter if you put them in same solution or not.