Activities of "heshengli"

hi

openiddict 不支持Front-Channel Logout和Back-Channel Logout机制.

如果你的只有system1system2这两个客户端, 你可以覆盖默认的LogoutController返回一个view 并添加2个客户端的注销url.

在2个系统中增加一个新的端点signout-oidc, 如果有请求到达就注销.

<!DOCTYPE html> 
<html> 
   <style>iframe{{display:none;width:0;height:0;}}</style> 
   <body> 
       <iframe src='https://localhost/signout-oidc'></iframe> 
       <iframe src='https://localhost/signout-oidc'></iframe> 
   </body> 
</html> 

https://github.com/abpframework/abp/blob/rel-7.2/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/LogoutController.cs#L12-L24

https://github.com/openiddict/openiddict-core/issues/312

FrontChannelLogout sid 是用户id ,是否有效

You can check&share all http requests during the logout process.

Use Chrome to record and export as a HAR file. The HAR file will contain the request and response cookies.

liming.ma@volosoft.com

Thanks.

system2 退出系统时,清理的是system2 的cookies和authserver 的cookie 。通过authserver 登录的blazor ,不受影响。 比如,一般情况下,autherver 44322/Account/Login ,登录成功后,直接访问system2 ,会重定向到authserver 登录,当authserver 已登录时,自动登录。登录成功后,autherver 44322/Account/Logout 退出登录,不影响system2 的登录状态。如何确保,authserver 44322/Account/Logout 退出登录时,使其他子系统cookie 都失效呢

hi

Do you have an online website to reproduce?

Thanks.

是否可以在线会议

  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core ( PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • this project add SameSiteCookiesServiceCollectionExtensions method

Blazor Cookies Not expired

  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

System.DllNotFoundException: Unable to load shared library 'ldap.so.2' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.10/ldap.so.2.so: cannot open shared object file: No such file or directory /app/ldap.so.2.so: cannot open shared object file: No such file or directory /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.10/libldap.so.2.so: cannot open shared object file: No such file or directory /app/libldap.so.2.so: cannot open shared object file: No such file or directory /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.10/ldap.so.2: cannot open shared object file: No such file or directory /app/ldap.so.2: cannot open shared object file: No such file or directory /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.10/libldap.so.2: cannot open shared object file: No such file or directory /app/libldap.so.2: cannot open shared object file: No such file or directory

at LdapForNet.Native.NativeMethodsLinux.ldap_initialize(IntPtr& ld, String uri) at LdapForNet.Native.LdapNativeLinux.Init(IntPtr& ld, String url) at LdapForNet.LdapConnection.Connect(String url, LdapVersion version) at LdapForNet.LdapConnectExtensions.Connect(ILdapConnection connection, Uri uri, LdapVersion version) at LdapForNet.LdapConnectExtensions.Connect(ILdapConnection connection, String hostname, Int32 port, LdapSchema ldapSchema, LdapVersion version) at Volo.Abp.Identity.ExternalLoginProviders.Ldap.OpenLdapManager.ConnectAsync(ILdapConnection ldapConnection) at Volo.Abp.Ldap.LdapManager.CreateLdapConnectionAsync() at Volo.Abp.Ldap.LdapManager.AuthenticateAsync(String username, String password)

permission is associated with feature. An error occurs when two systems use the same database

  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL,)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: 2024-11-25 14:49:00.491 +08:00 [ERR] Undefined feature: FileManagement.Enable Volo.Abp.AbpException: Undefined feature: FileManagement.Enable at Volo.Abp.Features.FeatureDefinitionManager.GetAsync(String name) at Volo.Abp.Features.FeatureChecker.GetOrNullAsync(String name) at Volo.Abp.Features.FeatureCheckerBase.IsEnabledAsync(String name) at Volo.Abp.Features.FeatureCheckerExtensions.IsEnabledAsync(IFeatureChecker featureChecker, Boolean requiresAll, String[] featureNames) at Volo.Abp.Features.RequireFeaturesSimpleStateChecker1.IsEnabledAsync(SimpleStateCheckerContext1 context) at Volo.Abp.SimpleStateChecking.SimpleStateCheckerManager1.InternalIsEnabledAsync(TState state, Boolean useBatchChecker) at Volo.Abp.SimpleStateChecking.SimpleStateCheckerManager1.IsEnabledAsync(TState state) at Volo.Abp.Authorization.Permissions.PermissionChecker.IsGrantedAsync(ClaimsPrincipal claimsPrincipal, String[] names) at Volo.Abp.Authorization.Permissions.PermissionChecker.IsGrantedAsync(String[] names) at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationAppService.GetAuthConfigAsync() at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationAppService.GetAsync(ApplicationConfigurationRequestOptions options) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync(ApplicationConfigurationRequestOptions options) at lambda_method3602(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
  • Steps to reproduce the issue:

Two appliaction programs, using the same database abp module table, one without file management and one using file management

  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core ( PostgreSQL.) /
  • Tiered (for MVC) or Auth Server Separated (for Angular): abp commerical template
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

blazor ->gateway->administrator
http request /api/abp/application-configuration error The page cannot be loaded

2024-05-20 16:41:35.861 +00:00 [INF] Request starting HTTP/1.1 GET https://192.168.23.81:44367/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - 0
2024-05-20 16:41:35.863 +00:00 [ERR] Exception occurred while processing message.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
2024-05-20 16:41:35.864 +00:00 [ERR] Connection id "0HN3OTEB940MK", Request id "0HN3OTEB940MK:0000000C": An unhandled exception was thrown by the application.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
2024-05-20 16:41:35.864 +00:00 [INF] Request finished HTTP/1.1 GET https://192.168.23.81:44367/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - 0 - 500 0 - 2.4266ms

running error

using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;

namespace OneAdmin.BaseManagement
{
    public class StudentAppService : ApplicationService, IStudentAppService
    {
        private readonly IRepository<Student, Guid> _StudentRepository;
        private readonly IRepository<Classes, Guid> _ClassesRepository;
        private readonly IRepository<ClassStudent> _ClassStudentRepository;

        public StudentAppService(
            IRepository<Student, Guid> studentRepository,
            IRepository<Classes, Guid> classesRepository,
            IRepository<ClassStudent> classStudentRepository
            )
        {
            _StudentRepository = studentRepository;
            _ClassesRepository = classesRepository;
            _ClassStudentRepository = classStudentRepository;
        }

        public async Task<bool> BatchCreateAsync()
        {

            await Task.Factory.StartNew(async () =>
            {
                try
                {
                    using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: false))
                    {
                        for (int indexClass = 1; indexClass <= 10; indexClass++)
                        {
                            var data = await _ClassesRepository.InsertAsync(new Classes(GuidGenerator.Create())
                            {
                                Name = indexClass.ToString(),
                                No = indexClass
                            }, true);
                            await CreateStudentAsync(data);
                        }
                    }

                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Error={ex.Message}");
                }
            });
            return true;
        }

        private async Task CreateStudentAsync(Classes classes)
        {
            var stuQuery = await _StudentRepository.GetQueryableAsync();
            var count = stuQuery.LongCount() + 1;
            for (int index = 1; index <= count; index++)
            {
                var student = await _StudentRepository.InsertAsync(new Student(GuidGenerator.Create())
                {
                    Name = index.ToString(),
                    No = index
                }, true);
                await Task.Delay(TimeSpan.FromSeconds(1));
                if (classes != null && student != null)
                {
                    await CreateClsStuAsync(classes, student);
                }
            }
        }

        private async Task CreateClsStuAsync(Classes classes, Student student)
        {
            await _ClassStudentRepository.InsertAsync(new ClassStudent(classes.Id, student.Id), true);
            await Task.Delay(TimeSpan.FromSeconds(1));

        }
    }
}

single entity insert not error,muti entity running error

alll code register single ,CommonService.BatchCreateAsync(),also running not error

using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace OneAdmin.BaseManagement
{
    public class CommonService 
    {
        private readonly IStudentRepository _StudentRepository;
        private readonly IClassesRepository _ClassesRepository;
        private readonly IClassStudentRepository _ClassStudentRepository;
        //private readonly IUnitOfWorkManager UnitOfWorkManager;
        public CommonService(
            IStudentRepository studentRepository,
            IClassesRepository classesRepository,
            IClassStudentRepository classStudentRepository
            //IUnitOfWorkManager unitOfWorkManager
            )
        {
            _StudentRepository = studentRepository;
            _ClassesRepository = classesRepository;
            _ClassStudentRepository = classStudentRepository;
            //UnitOfWorkManager = unitOfWorkManager;
        }


        public async Task<bool> BatchCreateAsync()
        {
            try
            {
                for (int indexClass = 1; indexClass <= 10; indexClass++)
                {
                    var data = await _ClassesRepository.InsertAsync(new Classes(Guid.NewGuid())
                    {
                        Name = indexClass.ToString(),
                        No = indexClass
                    }, true);
                    await Task.Delay(TimeSpan.FromSeconds(1));
                    //var clsQuery = await _ClassesRepository.GetQueryableAsync();
                    //await Console.Out.WriteLineAsync($"new:{clsQuery.LongCount()}");
                    var stuQuery = await _StudentRepository.GetQueryableAsync();
                    var count = stuQuery.LongCount();
                    for (int index = 1; index <= indexClass; index++)
                    {
                        var student = await _StudentRepository.InsertAsync(new Student(Guid.NewGuid())
                        {
                            Name = index.ToString(),
                            No = index
                        }, true);
                        await Task.Delay(TimeSpan.FromSeconds(1));
                        if (data != null && student != null)
                        {
                            await _ClassStudentRepository.InsertAsync(new ClassStudent(data.Id, student.Id), true);
                        }
                    }
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error={ex.Message}");
            }
            return true;
        }

        private async Task CreateStudentAsync(Classes classes)
        {
            var stuQuery = await _StudentRepository.GetQueryableAsync();
            var count = stuQuery.LongCount() + 1;
            for (int index = 1; index <= count; index++)
            {
                var student = await _StudentRepository.InsertAsync(new Student(Guid.NewGuid())
                {
                    Name = index.ToString(),
                    No = index
                }, true);
                await Task.Delay(TimeSpan.FromSeconds(1));
                if (classes != null && student != null)
                {
                    await CreateClsStuAsync(classes, student);
                }
            }
        }

        private async Task CreateClsStuAsync(Classes classes, Student student)
        {
            await _ClassStudentRepository.InsertAsync(new ClassStudent(classes.Id, student.Id), true);
            await Task.Delay(TimeSpan.FromSeconds(1));

        }
    }
}

  • ABP Framework version: v7.2.2

  • UI Type: Blazor WASM

  • Database System: EF Core ( PostgreSQL.)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

    在 Microsoft.EntityFrameworkCore.DbContext.CheckDisposed() 在 Microsoft.EntityFrameworkCore.DbContext.get_ContextServices() 在 Microsoft.EntityFrameworkCore.DbContext.get_Model() 在 Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.get_EntityType() 在 Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.CheckState() 在 Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.get_EntityQueryable() 在 Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.System.Linq.IQueryable.get_Provider() 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression1 predicate) 在 OneAdmin.BaseManagement.StudentAppService.<<BatchCreateAsync>b__2_0>d.MoveNext() 在 D:\workspace\projects\OneAdmin\src\OneAdmin.Application\BaseManagement\StudentAppService.cs 中: 第 34 行

Error=Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances. Object name: 'OneAdminDbContext'.

 public class StudentAppService : ApplicationService, IStudentAppService
 {
     private readonly IRepository<Student, Guid> _StudentRepository;
     public StudentAppService(IRepository<Student, Guid> studentRepository)
     {
         _StudentRepository = studentRepository;
     }

     [UnitOfWork(false)]
     public async Task<bool> BatchCreateAsync()
     {
         await Task.Factory.StartNew(async () =>
         {
             try
             {
                 for (int index = 1; index <= 10; index++)
                 {
                     await _StudentRepository.InsertAsync(new Student(GuidGenerator.Create())
                     {
                         Name = index.ToString(),
                         No = index
                     }, true);
                     await Task.Delay(TimeSpan.FromSeconds(5));
                     var query = await _StudentRepository.GetQueryableAsync();
                     var data = query.FirstOrDefault(t => t.No == index);
                     Console.WriteLine($"Name={data.Name},No={data.No}");
                 }
             }
             catch (Exception ex)
             {
                 Console.WriteLine($"Error={ex.Message}");

             }
         });
         return true;
     }
 }
Showing 1 to 10 of 27 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 08, 2025, 14:09