"ChetanKumbhar" की गतिविधियाँ

Hi,

I want to hard delete record from AbpUsersTable, Currently we are doing soft delete from AbpUsers Table. I went through some documents for hard delete, i found HardDeleteAsync method for hard delete. i found this method for my other DB repository, but not for Identity Module repository. I want hard delete user from AbpUsers Table. i could not found HardDeleteAsync this method for IdentityUserManager or any repository of identity model.

So how should i hard delete records from AbpUsers Table?

ABP Framework version: v3.0.4 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes / no Exception message and stack trace: Steps to reproduce the issue:

Hi,

I can show project & what problem i am facing remotely, but creating template project now it bit taking time because we created modules & separated hosts. & this needs to fix on immediate level.

Hi,

I can not share this one because its size & security, instead this can we connect in online session ?. In that session i can explain briefly to you.

Hi,

Any update ?

Hi, It's bit of urgen, can we connect through online session for this issue??

hi,

This is not worked, in my project I have called 2nd api inside main service, When i call that a main service throguh postman or web brawser, i am getting tenant id in 2nd api. but same when i call main service into unit test cases, I am getting tenant id as null. I am trying to get that tenant through Unit test cases.

can we connect though online session.?

Hi,

I am trying to access tenant id in unit test case project. Following configurations i have done in to my project.

set tenant id in App setting json of project "TenantId": "**********************************"

after this i have done some configuration in TestBaseModul.cs

Configure<AbpMultiTenancyOptions>(options =>
{
    options.IsEnabled = true;
});

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
    SeedTestData(context);

    var app = context.GetApplicationBuilder();
    app.UseMultiTenancy();
}

Now i am getting Object referance not set to instance .....exception. I have two question,

  1. Is this correct way to access tenant id in unit test cases if yes, then how should i fixed that exception.
  2. If not then, how should i access tenant id in Unit test cases.

ABP Framework version: v3.0.4 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes / no Exception message and stack trace: Steps to reproduce the issue:

Hi,

I have added following services, in my one of service. IPermissionGrantRepository _permissionGrantRepository IPermissionChecker _permissionChecker IPermissionStore _permissionStore

There is no issue while working with api. But now i am testing this in unit test projects. I am getting following error. ***********.InvoiceApplicationTests.GetListAsync Duration: 1 ms

Message: Autofac.Core.DependencyResolutionException : An exception was thrown while activating .InvoiceAppService. ---- Autofac.Core.DependencyResolutionException : None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type '.InvoiceAppService' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.PermissionManagement.IPermissionGrantRepository permissionGrantRepository' of constructor 'Void .ctor(.IInvoiceRepository, Volo.Abp.Linq.IAsyncQueryableExecuter, Microsoft.Extensions.Localization.IStringLocalizer1[***********.InvoiceManagementResource], Microsoft.Extensions.Logging.ILogger1[.InvoiceAppService], Volo.Abp.Uow.IUnitOfWorkManager, Volo.Abp.PermissionManagement.IPermissionGrantRepository, Volo.Abp.Authorization.Permissions.IPermissionChecker, Volo.Abp.Authorization.Permissions.IPermissionStore)'. Stack Trace: InstanceLookup.CreateInstance(IEnumerable1 parameters) InstanceLookup.Execute() ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) ResolveOperation.ResolveComponent(ResolveRequest request) ResolveOperation.Execute(ResolveRequest request) LifetimeScope.ResolveComponent(ResolveRequest request) ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable1 parameters) ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) AutofacServiceProvider.GetRequiredService(Type serviceType) ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) AbpTestBaseWithServiceProvider.GetRequiredServiceT InvoiceApplicationTests.ctor() line 24 ----- Inner Stack Trace ----- ReflectionActivator.GetValidConstructorBindings(ConstructorInfo[] availableConstructors, IComponentContext context, IEnumerable1 parameters) ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) InstanceLookup.CreateInstance(IEnumerable`1 parameters)

I have added following referances 

using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp; using Volo.Abp.Uow; using Microsoft.Extensions.DependencyInjection;

in **\test*.EntityFrameworkCore.Tests\EntityFrameworkCore project. still i am getting same error.

what configuration i am missing.

  • ABP Framework version: v3.0.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:
उत्तर

Hi,

After changes on call, I ran the Unit test cases, But now i am getting following exception.

Autofac.Core.DependencyResolutionException HResult=0x80131500 Message=An exception was thrown while activating Volo.Abp.PermissionManagement.PermissionDataSeedContributor -> Volo.Abp.PermissionManagement.PermissionDataSeeder. Source=Autofac StackTrace: at Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Volo.Abp.Data.DataSeeder.<SeedAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__13.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.<ProceedAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Volo.Abp.Uow.UnitOfWorkInterceptor.<InterceptAsync>d__3.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.<InterceptAsync>d__2.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at SCV.Litmus.ProfileManagement.ProfileManagementTestBaseModule.<>c__DisplayClass2_0.<<SeedTestData>b__0>d.MoveNext() in D:\Projects\core-platform-invoice-upload\SCV.Litmus\aspnet-core\modules\profile\test\SCV.Litmus.ProfileManagement.TestBase\ProfileManagementTestBaseModule.cs:line 35 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func`1 action) at SCV.Litmus.ProfileManagement.ProfileManagementTestBaseModule.SeedTestData(ApplicationInitializationContext context) in D:\Projects\core-platform-invoice-upload\SCV.Litmus\aspnet-core\modules\profile\test\SCV.Litmus.ProfileManagement.TestBase\ProfileManagementTestBaseModule.cs:line 31 at SCV.Litmus.ProfileManagement.ProfileManagementTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) in D:\Projects\core-platform-invoice-upload\SCV.Litmus\aspnet-core\modules\profile\test\SCV.Litmus.ProfileManagement.TestBase\ProfileManagementTestBaseModule.cs:line 26 at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)

This exception was originally thrown at this call stack: [External Code]

Inner Exception 1: DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.Abp.PermissionManagement.PermissionDataSeeder' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.PermissionManagement.IPermissionGrantRepository permissionGrantRepository' of constructor 'Void .ctor(Volo.Abp.PermissionManagement.IPermissionGrantRepository, Volo.Abp.Guids.IGuidGenerator)'.

उत्तर

Hi,

As per your feedback, i refered MyProjectNameEntityFrameworkCoreTestModule. But still same issue we are facing.

can we connect through online session? because this issue is on priority.

68 प्रविष्टियों में 31 से 40 दिखा रहा है
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11