Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "pankajmathur"

Just to add to my above post, here is the exact error that I get.

An unhandled exception occurred while processing the request.

HandlerException: Can't create component 'CitiXsys.iVend365.Surcharges.SurchargeAppService' as it has dependencies to be satisfied.

'CitiXsys.iVend365.Surcharges.SurchargeAppService' is waiting for the following dependencies:

  • Service 'CitiXsys.iVend365.EntityFrameworkCore.Repositories.iVend365RepositoryBase`2[[CitiXsys.iVend365.Surcharges.Surcharge, CitiXsys.iVend365.Core, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' which was not registered. Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency()

Hi,

I have the same problem. Earlier I was using ASP.Net MVC 5.x with JQuery. In this version I had made the <ProjectName>RepositoryBase class to public from protected and also its constructor to public from protected. After this I inject this in my Service constructor and I was getting the repository successfully. Once I had the repository, I was successfully calling the common methods written in <ProjectName>RepositoryBase class. Now I am using .Net Core With MVC and JQuery. I tried doing same thing here, i.e making the <ProjectName>RepositoryBase class to public from protected and also its constructor to public from protected. But when I inject this in my service constructor, I do not get the value. Instead I get the error saying service depends on <ProjectName>RepositoryBase which is not registered.

Any help on this would be appreciated.

Regards, Mahendra

Thanks....

Answer

Hi,

I am also getting the same error. What's the resolution. I already have checked my gmail credentials and all fine....

Hi Everyone,

I was able to do this by below steps.

  1. Login host application.
  2. Create Tenant from there
  3. It will ask to use Host DB or create new DB
  4. Choose new DB. It will create new database for that tenant.
  5. Login application with provided configuration. No need to change DB connection string anywhere.

Thank You,

Answer

Resolved after reading suggestion from below link.

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2076">https://github.com/aspnetboilerplate/as ... ssues/2076</a>

Answer

I got same error when I switched on redis cache. Below is stack trace of error.

at Abp.MultiTenancy.TenantCache2.CreateTenantCacheItem(TTenant tenant) at Castle.Proxies.TenantCache2Proxy.CreateTenantCacheItem_callback(Tenant tenant) at Castle.Proxies.Invocations.TenantCache2_CreateTenantCacheItem.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TenantCache2Proxy.CreateTenantCacheItem(Tenant tenant) at Abp.MultiTenancy.TenantCache2.<>c__DisplayClass7_0.<GetOrNull>b__0() at Abp.Runtime.Caching.TypedCacheExtensions.<>c__DisplayClass0_02.<Get>b__0(TKey k) at Abp.Runtime.Caching.CacheExtensions.<>c__DisplayClass3_02.<Get>b__0(String k) at Abp.Runtime.Caching.CacheBase.Get(String key, Func2 factory) at Abp.Runtime.Caching.CacheExtensions.Get[TKey,TValue](ICache cache, TKey key, Func2 factory) at Abp.Runtime.Caching.TypedCacheWrapper2.Get(TKey key, Func2 factory) at Abp.Runtime.Caching.TypedCacheExtensions.Get[TKey,TValue](ITypedCache2 cache, TKey key, Func1 factory) at Abp.MultiTenancy.TenantCache2.GetOrNull(Int32 tenantId) at Abp.MultiTenancy.TenantCache2.Get(Int32 tenantId) at Castle.Proxies.TenantCache2Proxy.Get_callback(Int32 tenantId) at Castle.Proxies.Invocations.TenantCache2_Get.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TenantCache2Proxy.Get(Int32 tenantId) at Abp.Zero.EntityFramework.DbPerTenantConnectionStringResolver.GetNameOrConnectionString(DbPerTenantConnectionStringResolveArgs args) at Abp.Zero.EntityFramework.DbPerTenantConnectionStringResolver.GetNameOrConnectionString(ConnectionStringResolveArgs args) at Abp.Domain.Uow.UnitOfWorkBase.ResolveConnectionString(ConnectionStringResolveArgs args) at Abp.EntityFramework.Uow.EfUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable1 multiTenancySide) at Abp.EntityFramework.Uow.UnitOfWorkExtensions.GetDbContext[TDbContext](IActiveUnitOfWork unitOfWork, Nullable1 multiTenancySide) at Abp.EntityFramework.Uow.UnitOfWorkDbContextProvider1.GetDbContext(Nullable1 multiTenancySide) at Castle.Proxies.EfRepositoryBase3Proxy_4.get_Context_callback() at Castle.Proxies.Invocations.EfRepositoryBase3_get_Context_6.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.EfRepositoryBase3Proxy_4.get_Context() at Abp.EntityFramework.Repositories.EfRepositoryBase3.get_Table() at Castle.Proxies.EfRepositoryBase3Proxy_4.get_Table_callback() at Castle.Proxies.Invocations.EfRepositoryBase3_get_Table_6.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.EfRepositoryBase3Proxy_4.get_Table() at Castle.Proxies.EfRepositoryBase3Proxy_4.GetAll_callback() at Castle.Proxies.Invocations.EfRepositoryBase3_GetAll_6.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.EfRepositoryBase3Proxy_4.GetAll() at Abp.EntityFramework.Repositories.EfRepositoryBase3.<FirstOrDefaultAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.Users.AbpUserStore2.<FindByNameOrEmailAsync>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.Users.AbpUserStore2.<FindByNameOrEmailAsync>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Abp.Authorization.AbpLogInManager3.<LoginAsyncInternal>d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AbpLogInManager3.<LoginAsync>d__34.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at CitiXsys.ManagementConsoleWeb.Web.Controllers.AccountController.

Answer

Hi,

Thanks for your reply.

One more question. How Can I get rid of Identity Column that it creates by default. I want to specify my own value in this field from service. Something like below.

public async Task CreateTaxCode(CreateTaxCodeInput input)
        {
            long abc = await _iVendRepository.GetNextPrimaryKeyValue();
            input.Id = abc; 
            var TaxCode = input.MapTo<TaxCode>();
            await _TaxCodeRepository.InsertAsync(TaxCode);
        }

Currently, due to Identity column, it discards my value that I set in the Id column.

The procedure has some input and some output parameter. The stored procedure is not related to an entity. It's a generic stored procedure that I need to call and get the value in Output parameter.

Please help urgently....

Showing 71 to 79 of 79 entries