Activities of "rogercprops"

It looks like you'd didn't read the full question.

We're on Abp V9 and I generated the solution and microservice using Abp Studio version 09.23. This is the solution configuration.

  • Template: microservice
  • Created ABP Studio Version: 0.9.23
  • Current ABP Studio Version: 0.9.23
  • Multi-Tenancy: Yes
  • UI Framework: mvc
  • Theme: leptonx
  • Theme Style: system
  • Run Install Libs: Yes
  • Database Provider: ef
  • Database Management System: sqlserver
  • Mobile Framework: none
  • Public Website: No
  • Include Tests: Yes
  • Dynamic Localization: Yes
  • Kubernetes Configuration: Yes
  • Grafana Dashboard: Yes
  • Use Local References: No
  • Optional Modules:
    • GDPR
    • TextTemplateManagement
    • AuditLogging
    • OpenIddictAdmin

The document link you sent looks like it's based on a previous version of the Microservice template and assumes you want to change everything to MongoDb. In our case we want the Abp microservices as well as most of our microservices to use SQL Server and a couple of other microservices to use MongoDB.

In the new Microservice (MemberConfig) I created withAbp Studio I selected MongoDb for the database provider. The solution that was generated is all MongDb including DistributedEvents, FeatureManagement, LanguageManagement, PermissionManagement and SettingManagement.

Below I've copied the DbContext and CloverleafCMSMemberConfigModule deleting what I thought was irrelevant code.

Please tell me what I need to update/add/delete so that the DistributedEvents, FeatureManagement, LanguageManagement, PermissionManagement and SettingManagement packages use SQL Server and the rest of the MemberConfig microservice use MongDb?

It would be very helpful to know that someone on the Abp team has gone through similar steps using a current version of everything (ABP Studio, Abp Suite and Microservice template).

This is the MemberConfigDbContext class

...other usings
using Volo.Abp.LanguageManagement;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.Studio.Client.AspNetCore;
using Volo.Abp.Swashbuckle;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement.MongoDB;
using Volo.Abp.PermissionManagement.MongoDB;
using Volo.Abp.LanguageManagement.MongoDB;
using Volo.Abp.FeatureManagement.MongoDB;
using Volo.Abp.AuditLogging.MongoDB;
using Volo.Saas.MongoDB;
using Volo.Abp.BlobStoring.Database.MongoDB;
using Volo.Abp.MongoDB.DistributedEvents;

namespace CloverleafCMS.MemberConfig;

[DependsOn(
typeof(BlobStoringDatabaseMongoDbModule),
typeof(AbpSettingManagementMongoDbModule),
typeof(LanguageManagementMongoDbModule),
typeof(AbpPermissionManagementMongoDbModule),
typeof(AbpFeatureManagementMongoDbModule),
typeof(AbpAuditLoggingMongoDbModule),
typeof(SaasMongoDbModule),
... other DependsOn,
typeof(AbpHttpClientModule)
)]

And this is the CloverleafCMSMemberConfigModule class

public class CloverleafCMSMemberConfigModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
var env = context.Services.GetHostingEnvironment();

var redis = CreateRedisConnection(configuration);

... other configures
ConfigureDatabase(context);
... other configures        
context.Services.TransformAbpClaims();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
var configuration = context.GetConfiguration();

if (env.IsDevelopment())
{
    app.UseDeveloperExceptionPage();
}

... other code
}

private void ConfigureDatabase(ServiceConfigurationContext context)
{
Configure<AbpDbConnectionOptions>(options =>
{
    options.Databases.Configure("Administration", database =>
    {
        database.MappedConnections.Add(AbpPermissionManagementDbProperties.ConnectionStringName);
        database.MappedConnections.Add(AbpFeatureManagementDbProperties.ConnectionStringName);
        database.MappedConnections.Add(AbpSettingManagementDbProperties.ConnectionStringName);
    });
    
    options.Databases.Configure("AuditLoggingService", database =>
    {
        database.MappedConnections.Add(AbpAuditLoggingDbProperties.ConnectionStringName);
    });

    options.Databases.Configure("SaasService", database =>
    {
        database.MappedConnections.Add(SaasDbProperties.ConnectionStringName);
    });
    
    options.Databases.Configure("LanguageService", database =>
    {
        database.MappedConnections.Add(LanguageManagementDbProperties.ConnectionStringName);
    });
});

context.Services.AddMongoDbContext<MemberConfigDbContext>(options =>
{
    options.AddDefaultRepositories();
});

context.Services.AddAlwaysDisableUnitOfWorkTransaction();
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
    options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}

private void ConfigureDistributedEventBus()
{
Configure<AbpDistributedEventBusOptions>(options =>
{
    options.Inboxes.Configure(config =>
    {
        config.UseMongoDbContext<MemberConfigDbContext>();
    });

    options.Outboxes.Configure(config =>
    {
        config.UseMongoDbContext<MemberConfigDbContext>();
    });
});
}

private void ConfigureIntegrationServices()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ExposeIntegrationServices = true;
});

}

 private void ConfigureObjectMapper(ServiceConfigurationContext context
 {
 
context.Services.AddAutoMapperObjectMapper<CloverleafCMSMemberConfigModule>();

Configure<AbpAutoMapperOptions>(options =>
{
    options.AddMaps<CloverleafCMSMemberConfigModule>(validate: true);
});
}
  • ABP Framework version: Commercial 9.04
  • UI Type: N/A
  • Database System: EF Core & MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue:

We created a new Microservice solution using Abp Studio and selected EF Core as the database. So all of the Abp generated microservices (Administration, AuditLogging, Identity, etc.) are using MS Sql databases

Most of our microservices use EF Core but we have a couple that use MongoDB.

I added a new microservice module using Studio and selected MongoDB as the database provider. I then created an entity using Abp Suite and generated all of the code. In the appsettings file the connection strings for the Abp microservices are correctly pointing to the SQL Server databases. I updated the connection string for the new Microservice with the connection string to the MongoDB project.

When I ran the new microservice it correctly created the collections for the new Microservice but it also added collections for the Abp microservices (AbpFeatureGroups, AbpFeatureValues, AbpPermissions, etc) in the mongo database.

Looking at the code I see these in the application module. using Volo.Abp.SettingManagement.MongoDB; using Volo.Abp.PermissionManagement.MongoDB; using Volo.Abp.LanguageManagement.MongoDB; using Volo.Abp.FeatureManagement.MongoDB; using Volo.Abp.AuditLogging.MongoDB; using Volo.Saas.MongoDB; using Volo.Abp.BlobStoring.Database.MongoDB;

I updated the csproj file and the module to use EF Core packages but am getting errors configuring the database for the microservice entity.

I then reviewed the answer to this support question https://abp.io/support/questions/1269/using-MongoDB-in-microservice-service-inside-microservice-solution-which-uses-efcore but it appears written for v8 and it seems there are significant changes to the microservice template in V9.

Is there a document or can you provide detailed steps to update the microservice to use EntityFrameworkCore for the Abp services and MongoDb for our microservice?

Thank you in advance.

I mistakenly uploaded the same image twice. Here's the screenshot showing the processes running in activity monitory:

  • ABP Framework version: v9.0.4
  • ABP Studio version: 0.9.23
  • UI Type: N/A
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): Yes
  • Exception message and full stack trace: Port 44370 is in use. Please close the application that uses this port and try again.
  • Steps to reproduce the issue:

I submitted a response the to the community ABP Studio bugs support question but haven't seen a response.

We're using the microservices template and I'm running ABP Studio on a Macbook M1 with Mac OS Sequoia 15.3.1.

When I start the applications/services from Studio and then stop them they don't actually stop. So the next time I try to start them I get the message that the port is already in use. I've tried killing the processes on those ports but I see this message in the logs for a service when I try to restart it. Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=320, text='CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'', classId=0, methodId=0

The only work around I've found is to restart my Mac which if I do this multiple times a day it adds up to a lot of wasted time.

Not sure if anyone else using MacOs is having this issue but when running the Microservice solution in Abp Studio, if I stop a service (or all services) it doesn't actually stop the process. If I try to restart the service it just keeps restarting and exiting.

If I navigate to the Swagger url for the service it brings it up (e.g. localhost:44317/swagger) so obviously it hasn't stopped.

The only work around I've found is to restart my Mac.

Below are screenshots of the Adminstration Service supposedly stopped and the exiting with Code 1 continuously after I restart it.

We added the logger statements to all of the services and the auth server but they showed they were the same.

But, our other developer remembered that we had changed our default pass phrases when we deployed our apps to AKS. So the appsettings running localhost and the environment variables in the AKS deployment were different. The SMTP user password in our test tenant must have been set & hashed with localhost before we moved our apps to AKS. He reset the SMTP password with the current default pass phrase settings and the problem went away.

Thank you for pointing us in the right direction. Also, if you can direct to any documentation on how the default pass phrase is used across your packages and templates that would be helpful. This seems to be the only issue resulting from changing the default pass phrases.

Where do I put public override void OnApplicationInitialization(ApplicationInitializationContext context) { var env = context.GetEnvironment(); var app = context.GetApplicationBuilder();

var opt = app.ApplicationServices.GetRequiredService<IOptions<AbpStringEncryptionOptions>>();

Logger.LogInformation("pass phrase is : " + opt.DefaultPassPhrase);
.....

}

What module/program file within the Authserver solution?

Hi,

I don't understand your response. What do you mean?: "This is a problem with your StringEncryption. They used different values, so setting values could not be decrypted."

Different values from what? We have the StringEncryption in the Kubernetes pod config environment variables in the authserver application:

Where else is the StringEncryption?

Why was this closed. You all haven't answered the question.

Hi,

Yes I can see the password for the tenant but it is null for the host which is our requirement. Each tenant will have their own SMTP servers, usernames, etc.

Where would I put Logger statement?

Thank you.

Showing 31 to 40 of 93 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20