This logs look like redis can't found
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 903
at Yiki.CoFarm.CoFarmIdentityServerModule.ConfigureServices(ServiceConfigurationContext context) in /src/aspnet-core/src/Yiki.CoFarm.IdentityServer/CoFarmIdentityServerModule.cs:line 113
at Volo.Abp.AbpApplicationBase.ConfigureServices()
--- End of inner exception stack trace ---
at Volo.Abp.AbpApplicationBase.ConfigureServices()
at Volo.Abp.AbpApplicationBase..ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
at Volo.Abp.AbpApplicationWithExternalServiceProvider..ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
at Volo.Abp.AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
at Volo.Abp.AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Yiki.CoFarm.Startup.ConfigureServices(IServiceCollection services) in /src/aspnet-core/src/Yiki.CoFarm.IdentityServer/Startup.cs:line 10
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Yiki.CoFarm.Program.Main(String[] args) in /src/aspnet-core/src/Yiki.CoFarm.IdentityServer/Program.cs:line 31
2021-03-22 06:34:47.175 +00:00 [INF] Starting Yiki.CoFarm.IdentityServer.
2021-03-22 06:34:48.271 +00:00 [FTL] Yiki.CoFarm.IdentityServer terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServices phase of the module Yiki.CoFarm.CoFarmIdentityServerModule, Yiki.CoFarm.IdentityServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 0s ago, v: 2.0.593.37019
at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Object configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 941
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 903
at Yiki.CoFarm.CoFarmIdentityServerModule.ConfigureServices(ServiceConfigurationContext context) in /src/aspnet-core/src/Yiki.CoFarm.IdentityServer/CoFarmIdentityServerModule.cs:line 113
at Volo.Abp.AbpApplicationBase.ConfigureServices()
......
Thanks, I will try.
version: '3.4'
services:
basketdata:
image: redis
# volumes:
# - /Users/Shared/redis-data:/var/lib/redis/data
sqldata:
image: postgres
environment:
- POSTGRES_DB=CoFarm
- POSTGRES_USER=aspnetcore
- POSTGRES_PASSWORD=<pwd>
# volumes:
# - /Users/Shared/pg-data:/var/lib/pgsql/data
yikicofarmidentityserver:
image: yikicofarmidentityserver
environment:
- ConnectionString=User ID=aspnetcore;Password=<pwd>;Host=sqldata;Port=5432;Database=CoFarm;Pooling=true;Minimum Pool Size=0;Maximum Pool Size=100;Connection Lifetime=0;
build:
context: .
dockerfile: aspnet-core/src/Yiki.CoFarm.IdentityServer/Dockerfile
ports:
- 80
depends_on:
- basketdata
- sqldata
# volumes:
# - ~/Users/yikicoform:/ids:rw
yikicofarmhttpapihost:
image: yikicofarmhttpapihost
environment:
- ConnectionString=User ID=aspnetcore;Password=<pwd>;Host=sqldata;Port=5432;Database=CoFarm;Pooling=true;Minimum Pool Size=0;Maximum Pool Size=100;Connection Lifetime=0;
build:
context: .
dockerfile: aspnet-core/src/Yiki.CoFarm.HttpApi.Host/Dockerfile
ports:
- 81
depends_on:
- basketdata
- sqldata
The operation in abp suite can be summarized as the following steps: 1.Create an Application template project 2.On the Module page, use the button to create a module, which will automatically add dependencies to the Application Module 3.Open the Module just created in abp suite, add an entity, click the generate button, an error Cannot find Volo.Abp.Commercial.SuiteTemplates.dll #4 This works fine if I add the package 4.After that, the back-end code was generated normally, but the front-end angular did not generate it I think the page generated by crud should be under the application module's angle, not under models own angular. I recommend putting this modules in the outermost directory.
I want to make a module similar to the module you provide, and then pluggable use. Is this method feasible and is there a good method to recommend?
[Cannot find Volo.Abp.Commercial.SuiteTemplates.dll #4](https://support.abp.io/QA/Questions/48/Cannot-find-VoloAbpCommercialSuiteTemplatesdll)
Earlier, abp suite did not support module generation curd, now I still encounter some problems. And, when I create a module in the application module, their UI are not separated
When an entity has an AppUser navigation property, angular does not generate AppUserDto
I reproduced it.
AppUserDto
doesn't exist in the Angular template (out of box).
But if you run generate-proxy AppUserDto will be generated in your Angular code. Anyway I created an issue for that.
Where Can I see this issue, and is there any progress?
I think business (data) permissions and functional permissions need to be distinguished. I use organizational structure to solve these problems.
I also met the same requirement, using OU for data permissions and filtering data, you can refer to the following documents to achieve
Hello, I try do this, and I realized that there was a problem with my previous understanding. I thought that the identity service was only used as a certification center, and then directly used dotnet run to run it. In the debug hostapi project, the rewritten code actually added needs to be called by the identity Server service Yes, the above two methods can be useful, but it is better to have a document description, thank you.
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.Uow;
using IdentityRole = Volo.Abp.Identity.IdentityRole;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Hang.Blog.Web.MyIdentity
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpUserClaimsPrincipalFactory))]
public class MyUserClaimsPrincipalFactory :
AbpUserClaimsPrincipalFactory, ITransientDependency
{
public MyUserClaimsPrincipalFactory(
UserManager<IdentityUser> userManager,
RoleManager<IdentityRole> roleManager,
IOptions<IdentityOptions> options,
ICurrentPrincipalAccessor currentPrincipalAccessor,
IAbpClaimsPrincipalFactory abpClaimsPrincipalFactory) :
base(userManager, roleManager, options, currentPrincipalAccessor, abpClaimsPrincipalFactory)
{
}
[UnitOfWork]
public override async Task<ClaimsPrincipal> CreateAsync(Volo.Abp.Identity.IdentityUser user)
{
var principal = await base.CreateAsync(user);
principal.Identities
.First().AddClaim(new Claim("Test", "123"));
return principal;
}
}
}
or
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.Users;
namespace BookStore
{
public class MyAbpClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
private readonly IdentityUserManager _identityUserManager;
public MyAbpClaimsPrincipalContributor(
IdentityUserManager identityUserManager)
{
_identityUserManager = identityUserManager;
}
public async Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
{
var identityUser = await _identityUserManager.GetUserAsync(context.ClaimsPrincipal);
var organizationUnits = await _identityUserManager.GetOrganizationUnitsAsync(identityUser);
}
}
}