Hi,
My project have total 7 micro-services out of which 1 is dedicated for SignalR Post deployment other 6 are working fine, but the one which is dedicated for SignalR is giving CORS error. All the appsettings and Host Module logic looks fine as same logic is working for other 6 services. There are no logs in Cloud Watch to check for. Not getting any more details, only this URL in network tab : https://xxx.dev.xxxxx.com/eventsync/hubs/notifications/negotiate?negotiateVersion=1 PFA images for your reference
We have a release planned and it is having very high priority. Please let me know if someone from support team is available for discussion.
@gterdem
Our solution structure is bit different as compared to your microservice template. This application was create way before abp.io Micro service template came into picture. We connected with abp.io at times of creation of our application, it was created manually by guidance of abp.io support team only.
Can we please connect and have a look yourself as giving you sample source is not possible and we cannot provide you original source code as well.
Hi,
Could you please reply to this question ?
Hi,
I have added new Micro-Service into my Microservice architecture application solution.
For CurrentUser
I can only get phone number field
For CurrentTenant
I can only get the Id
[Authorize]
public Task<SampleDto> GetAuthorizedAsync()
{
var user = CurrentUser.UserName;
var tenant = CurrentTenant.Id;
return Task.FromResult(
new SampleDto
{
Value = 42
}
);
}
FYI
abp new XXX.XXXX.XXXXX -t module-pro -csf --no-ui -dbms PostgreSQL -v 4.4.4
Volo.Abp.IdentityServer.Application
in the .csproj file of Application
project, but for my newly created project this package was not installed and also when I tried to install this package I am not able to find it on nuget package manager ( Image for your reference below ) and when I tried editing the .csproj and try to add it there, this package is not getting resolved. i.e. Volo.Abp.IdentityServer.Application
Thanks!!!
Hi,
I need to override AbpTenantAppService.FindTenantByNameAsync()
method.
How do I do it ?
I tried it as per your documentation https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services#overriding-a-service-class , but not able to resolve this below issue
These are links to the code I need to override. https://github.com/abpframework/abp/blob/4.4.4/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs https://github.com/abpframework/abp/blob/4.4.4/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs
Thanks you !!!
LitmusAppService
is not like any other app service
It is the custom base AppService
which Inherit from ApplicationService
And yes I am sure I am getting the same error.
Can you share the code?
LitmusAppService :
public abstract class LitmusAppService : ApplicationService
{
protected LitmusAppService()
{
LocalizationResource = typeof(LitmusResource);
}
}
CustomTenantAppService :
namespace SCV.Litmus.LitmusTenants
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITenantAppService), typeof(CustomTenantAppService))]
public class CustomTenantAppService : LitmusAppService, ITenantAppService
{
protected IEditionRepository EditionRepository { get; }
protected IDataSeeder DataSeeder { get; }
protected IDistributedEventBus DistributedEventBus { get; }
protected ITenantRepository TenantRepository { get; }
protected ITenantManager TenantManager { get; }
private readonly ISharedAppServices _sharedAppServices;
protected AbpDbConnectionOptions DbConnectionOptions { get; }
public CustomTenantAppService(
ITenantRepository tenantRepository,
IEditionRepository editionRepository,
ITenantManager tenantManager,
IDataSeeder dataSeeder,
IDistributedEventBus distributedEventBus,
IOptions<AbpDbConnectionOptions> dbConnectionOptions,
SCV.Litmus.SharedAppService.ISharedAppServices sharedAppServices)
{
EditionRepository = editionRepository;
DataSeeder = dataSeeder;
DistributedEventBus = distributedEventBus;
DbConnectionOptions = dbConnectionOptions.Value;
TenantRepository = tenantRepository;
TenantManager = tenantManager;
_sharedAppServices = sharedAppServices;
}
}
}
Error :
[11:54:00 ERR] [null] The requested service 'SCV.Litmus.LitmusTenants.CustomTenantAppService' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'SCV.Litmus.LitmusTenants.CustomTenantAppService' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Thanks @maliming It is working as expected you can close this ticket now.
I just have one query if you can answer that before you close this ticket.
This is my LitmusAppService
public abstract class LitmusAppService : ApplicationService
{
protected LitmusAppService()
{
LocalizationResource = typeof(LitmusResource);
}
}
I tried by inheriting LitmusAppService
still it gave me the same error
But LitmusAppService
inherits from ApplicationService
, this is one and the same right ?
I mean I am still not getting it why it is not working when I inherit it from LitmusAppServie
and why it is working when I inherit it from ApplicationService
.
You should use
ITenantAppService
in the controller instead ofCustomTenantAppService
So you mean I should override Controller also ? Can you provide some sample code ? See I just have to play around with ApplyDatabaseMigrationAsync only, I dont need to override the whole service. Give me some sample code how I can override or make new service and implement this method in it. And it should be called from Saas Tenants options on UI as below
I tried this as well, getting same issue as below
[11:54:00 ERR] [null] The requested service 'SCV.Litmus.LitmusTenants.CustomTenantAppService' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'SCV.Litmus.LitmusTenants.CustomTenantAppService' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)