Activities of "imranStem"

Hello Team,

I have one ABP application with the EntityFrameworkCore integration. I have created one module with MongoDB and integrated it with the existing application. I injected the ApplicationService, HttpApi, and MongoDB modules into the host application of the main application. With this configuration, when I run the application, I am getting the below exception in the application.

  • ABP Framework version: v4.3.2
  • UI type: Angular
  • DB provider: EF Core in application / MongoDB as Module
  • Tiered (MVC) or Identity Server Separated (Angular): yes, its separated
  • Exception message and stack trace:
  An error occurred during ConfigureServices phase of the module Test.MongoDB.TestMongoDbModule, Test.MongoDB,
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServices phase of the module Test.MongoDB.TestMongoDbModule, Test.MongoDB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<System.Type> Volo.Abp.DependencyInjection.AbpCommonDbContextRegistrationOptions.get_ReplacedDbContextTypes()'.
at Microsoft.Extensions.DependencyInjection.AbpMongoDbServiceCollectionExtensions.AddMongoDbContext[TMongoDbContext](IServiceCollection services, Action`1 optionsBuilder)
at Test.MongoDB.TestMongoDbModule.ConfigureServices(ServiceConfigurationContext context) in ..\MongoDbModule\src\Test.MongoDB\MongoDb\TestMongoDbModule.cs:line 32
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 Test.Startup.ConfigureServices(IServiceCollection services) in ..\aspnet-core\src\Test.HttpApi.Host\Startup.cs:line 12
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 Test.Program.Main(String[] args)
  • Steps to reproduce the issue:" Add MongoDB module into the EFCore application.

Angular UI project is not authenticated. When I click on the login button, it redirects to the authentication server, I logged in then it's redirected back to the client project but it's not authenticated. I checked the network tab and the current user returns null and authorized false. When I open the authentication server, then it displays the current user logged in but the client is not authenticated.

  • ABP Framework version: v4.3.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:No Exception
  • Steps to reproduce the issue:"

Hi,

I have created the ABP microservices template project and configured the Azure Service Bus to integrate the event bus. I removed the RabbitMq injection from modules and configuration from appsettings. When I run the projects, I got the error of RabbitMq as microservices use the RabbitMq configuration for the background jobs (AbpBackgroundJobsRabbitMqModule) so I decide to put the RabbitMq integration again in the project.

My appsettings.json file has the below configuration.

"RabbitMQ": {
    "Connections": {
      "Default": {
        "HostName": "localhost"
      }
    },
    "EventBus": {
      "ClientName": "Project_AuthServer",
      "ExchangeName": "Project"
    }
  },
  "Azure": {
    "ServiceBus": {
      "Connections": {
        "Default": {
          "ConnectionString": "Endpoint=sb://mydomain.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey={{AccessKey}}"
        }
      }
    },
    "EventBus": {
      "ConnectionName": "Default",
      "SubscriberName": "Project_Subscriber",
      "TopicName": "Projecty_AuthServer"
    }
  },

So now, I have two configurations for the event bus, the Azure service bus, and RabbitMq but how it will work to publish and subscribe to the events? I want to use the Azure service bus for the publishing and subscription event bus for the microservices but BackgroundJobs needs configuration of RabbitMq as well.

Do we need to define the EventBus settings for the RabbitMq configuration?

  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

I have created a microservices project using the ABP Suite and configured it as per the documentation of the microservice template. When I run the web gateway, I cannot see all the endpoints of administration, identity service, and saas microservices. I checked the source code and compared the microservice template with the older version 4.4.0 and found the following code changes in the WebGateway Module file.

The older version 4.4.0 injected the below modules into the web gateway module.

[DependsOn(
        typeof(CoreSharedHostingGatewaysModule),
        typeof(ProductServiceHttpApiModule),
        typeof(AbpAccountPublicHttpApiModule),
        typeof(IdentityServiceHttpApiModule),
        typeof(SaasServiceHttpApiModule),
        typeof(AdministrationServiceHttpApiModule)
    )]
    public class CoreWebGatewayModule : AbpModule
    {}

In the newer version, 5.0.0 injected the below modules into the web gateway module.

[DependsOn(
        typeof(ChurchPharmacySharedHostingGatewaysModule),
        typeof(ProductServiceHttpApiModule)
    )]
    public class CoreWebGatewayModule : AbpModule
    {}

In the newer version, the administration, identity service, and saas module are not injected. Do we need to inject these three modules into the web gateway to use the endpoints of those modules? the appsettings.json file contains the route configuration of all these modules but endpoints are visible in the Swagger UI.

  • ABP Framework version: 5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I have downloaded the latest source code from the Github repository and I successfully build the ABP framework and Azure Event bus sample code. I configured the azure connection string, topic name, and subscription. When I run the project, it throws the stack overflow exception. I debug the code and found the following issues.

public async Task PublishAsync(
        Type eventType,
        object eventData,
        bool onUnitOfWorkComplete = true,
        bool useOutbox = true)
    {
        if (onUnitOfWorkComplete && UnitOfWorkManager.Current != null)
        {
            AddToUnitOfWork(
                UnitOfWorkManager.Current,
                new UnitOfWorkEventRecord(eventType, eventData, EventOrderGenerator.GetNext(), useOutbox)
            );
            return;
        }
        if (useOutbox)
        {
            if (await AddToOutboxAsync(eventType, eventData))
            {
                return;
            }
        }
        await PublishToEventBusAsync(eventType, eventData);
    }`

In the above code, the value of UnitOfWorkManager.Current is null so it jumps to the second condition, and executes the AddToOutboxAsync method.

`private async Task<bool> AddToOutboxAsync(Type eventType, object eventData)
    {
        var unitOfWork = UnitOfWorkManager.Current;
        if (unitOfWork == null)
        {
            return false;
        }
        foreach (var outboxConfig in AbpDistributedEventBusOptions.Outboxes.Values)
        {
            if (outboxConfig.Selector == null || outboxConfig.Selector(eventType))
            {
                var eventOutbox = (IEventOutbox)unitOfWork.ServiceProvider.GetRequiredService(outboxConfig.ImplementationType);
                var eventName = EventNameAttribute.GetNameOrDefault(eventType);
                await eventOutbox.EnqueueAsync(
                    new OutgoingEventInfo(
                        GuidGenerator.Create(),
                        eventName,
                        Serialize(eventData),
                        Clock.Now
                    )
                );
                return true;
            }
        }
        return false;
    }

Again, in the above method, it checks the unit of work which is null so it returns false and PublishToEventBusAsync is executing and that method again calls the first publish method so the code executing into the loop and throws stack overflow exception.

I also tried to read the documents on azure event bus, the link redirects to 404 page.

Distributed-Event-Bus-Azure-Integration

I successfully integerated the RabbitMq integration in my project but we are planning to migrate into Azure service bus with ABP 5.0 version but it is in preview mode and documentation is not completed yet.

Thanks Imrankhan

  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:" Download the sample codes of azure service bus and run the console application.

Hello ABP Team,

We have commercial license with 5 developers account. We are using ABP suite for development so there are pro modules in our projects. When we are working on visual studio and running the application, we require to login in ABP account so abp login is required in development mode. What will happen when the commercial license period end? Can our developers still login and work in develoment mode? I know that we won't be able to use ABP suite but can we work on our own modules and run the application in development as we are using the pro modules?

  • ABP Framework version: 4.X.X
  • UI type: Angularr
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

How to integrate login/registration pages in angular project?

When I run the angular project and click on Login Page, it redirect to the Identity Server URL. We need to use the same domain where our Angular project is hosted. We are also using Volo.Account npm package in angular project so login page should be served by https://localhost:4200/account/login url.

I read the documentations and articles but no article found to integrate login in Angular UI.

Here is the article to customize the login page for MVC razor page and we need to customize the login page for Angular. https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd

  • ABP Framework version: 4.4.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Showing 41 to 47 of 47 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13