Activities of "rogercprops"

Ok. I updated the module. However it's probably fine to have the AbpDistributedEventBus use MongoDB in the same database.

However I had to add code to configure the SQL dbcontexts Configure<AbpDbContextOptions>(options => { options.Configure<PermissionManagementDbContext>(dbContextOptions => { dbContextOptions.UseSqlServer(); }); ... remaining Sql db contexts

Here's the revised MemberConfigDbContext

using CloverleafCMS.MemberConfig.Members;
using MongoDB.Driver;
using Volo.Abp.Data;
using Volo.Abp.MongoDB;
using Volo.Abp.MongoDB.DistributedEvents;

namespace CloverleafCMS.MemberConfig.Data;

[ConnectionStringName(DatabaseName)]

public class MemberConfigDbContext :
    AbpMongoDbContext,
    IHasEventInbox,
    IHasEventOutbox
{
    public IMongoCollection<Member> Members => Collection<Member>();
    public const string DatabaseName = "MemberConfig";

    public IMongoCollection<IncomingEventRecord> IncomingEvents => Collection<IncomingEventRecord>();
    public IMongoCollection<OutgoingEventRecord> OutgoingEvents => Collection<OutgoingEventRecord>();


    protected override void CreateModel(IMongoModelBuilder modelBuilder)
    {
        base.CreateModel(modelBuilder);

        modelBuilder.ConfigureEventInbox();
        modelBuilder.ConfigureEventOutbox();
    }
}

I was able to build and run the application. However when I execute the post route of the API I get this error: Error] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": null, "validationErrors": null }

3/5/2025 9:15:38 PM [Error] Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.MembersAppServiceProxy -> CloverleafCMS.MemberConfig.Members.MongoMemberRepository. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'CloverleafCMS.MemberConfig.Members.MongoMemberRepository' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.MongoDB.IMongoDbContextProvider1[CloverleafCMS.MemberConfig.Data.MemberConfigDbContext] dbContextProvider' of constructor 'Void .ctor(Volo.Abp.MongoDB.IMongoDbContextProvider1[CloverleafCMS.MemberConfig.Data.MemberConfigDbContext])'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info.

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&lt;AbpDbConnectionOptions&gt;(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&lt;MemberConfigDbContext&gt;(options =>
{
    options.AddDefaultRepositories();
});

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

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

    options.Outboxes.Configure(config =>
    {
        config.UseMongoDbContext&lt;MemberConfigDbContext&gt;();
    });
});
}

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

}

 private void ConfigureObjectMapper(ServiceConfigurationContext context
 {
 
context.Services.AddAutoMapperObjectMapper&lt;CloverleafCMSMemberConfigModule&gt;();

Configure&lt;AbpAutoMapperOptions&gt;(options =>
{
    options.AddMaps&lt;CloverleafCMSMemberConfigModule&gt;(validate: true);
});
}

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

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&lt;IOptions&lt;AbpStringEncryptionOptions&gt;>();

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.

Thanks. That was helpful

Showing 31 to 40 of 74 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.