Activities of "EngincanV"

Hi, it's the same as how to create it on the .NET side. You need to create an attribute that inherits from ValidationAttribute and implement the IsValid method:

[AttributeUsage(AttributeTargets.Property)] //only can be used in properties
public class YourCustomAttribute : ValidationAttribute
{
    protected override ValidationResult IsValid(object value, ValidationContext validationContext)
    {
        //implement
    }
}

Then use the attribute on top of your property or class:

public class CreateNewsDto
 {
      [Required(ErrorMessage = "The {0} field is required")]
      [StringLength(200, ErrorMessage = "The {0} must not exceed {1} characters")]
      [YourCustom] //your attribute
      public string TitleAr { get; set; }
      
      //...      
}

Since this is not related to ABP, you can refer to https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/reflection-and-attributes/ for further info.

Regards.

Hi,

Thanks for your clarification. Do i need to do the same for BlobStoring database as well since file-management module based on blob storing system?

If you want you can also separate its database but you don't have to. (In your host database, it seems Blobs and AbpBlobContainers tables are already there. So, no need to.)

Does it mean in microservice template, we must use module specific database approach if make use of file-management service and Default database approach does not support this?

Actually, it's not module-specific but service-specific, yes. These are separate and independent services and, therefore, have independent databases. But not only services have a single module; for example, the administration service composes multiple services, and its database contains multiple tables from different modules.

The default connection string is used as a fallback value if you don't define a connection string for a specific microservice database and it's also supported in microservices. (https://abp.io/docs/latest/solution-templates/microservice/database-configurations#the-connection-string-management-modal)

Regards.

Hi, sorry for the misunderstanding. Since you are using microservice template, when you selected "File Management" module as an optional module, ABP creates a separate service for the module, which is an independent service with independent database.

So, using Default connection string will not work.

Instead, you should add the following code to your saas service (only add for the file-management service, the other ones should already be added) - in the ConfigureDatabase method (inside the saasmodule class) -:

        Configure<AbpDbConnectionOptions>(options =>
        {
            options.Databases.Configure("AdministrationService", 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("LanguageService", database =>
            {
                database.MappedConnections.Add(LanguageManagementDbProperties.ConnectionStringName);
            });
            
            //only add the following:
            options.Databases.Configure("FileManagementService", database =>
            {
                database.MappedConnections.Add("FileManagement");
            });
        });

Then, in the appsettings.json file of your Saas Service, add the FileManagementService connection string:

  "ConnectionStrings": {
    "AdministrationService": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_Administration; TrustServerCertificate=true; Connect Timeout=240;",
    "AuditLoggingService": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_AuditLoggingService; TrustServerCertificate=true; Connect Timeout=240;",
    "LanguageService": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_LanguageService; TrustServerCertificate=true; Connect Timeout=240;",
    "AbpBlobStoring": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_BlobStoring; TrustServerCertificate=true; Connect Timeout=240;",
    "SaasService": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_SaasService; TrustServerCertificate=true; Connect Timeout=240;",
    "FileManagementService": "Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Issue9265_FileManagementService; TrustServerCertificate=true; Connect Timeout=240;"
},

After that, while configuring connection strings for your module, you should be able to see the FileManagementService in the list:

Here, you can define your connection string for the file-management service. Also, you can use the same approach if there is any additional service that you want to make database per tenant configuration.

Regards.

Hi, thanks for reporting this problem. We have already fixed that problem and will release v9.1.3 with the fix (https://github.com/abpframework/abp/pull/22861).

I'm refunding your ticket, so please wait for v9.1.3 to upgrade the ABP Suite, which we will release probably tomorrow or next week (as soon as possible).

Regards.

Answer

Could this change be the reason for the issue?

Yes, this is likely the reason for this problem. I'll confirm that but, probably this is the reason.

Hi, thanks for reporting this problem. We have already fixed that problem and will release v9.1.3 with the fix (https://github.com/abpframework/abp/pull/22861).

I'm refunding your ticket, so please wait for v9.1.3 to upgrade the ABP Suite, which we will release probably tomorrow or in the next week (as soon as possible).

Regards.

I could not reproduce the problem that you are facing. I've replaced packages with source code for the AuditLogging UI module, and it is successfully added:

Probably there is an outdated .dll in your local machine, this causes the problem. Can you make a hard clean in your solution, and search for all .dlls and try again? Because, i'm unable to reproduce it right now. (I've directly installed your solution, and add it in ABP Suite and then make the source code replacement. If you have additional step, please let me know)

Regards.

Hi EngincanV, i've sent you an email 2 days ago

Sorry for the late response, I got your email, and I'll check and write back asap.

Hi, can you please provide more information? For example, you did not just updated the target framework and also updated the packages, right? Or did you override the role pages or its script etc.?

Answer

Hi, I'm unable to reproduce the problem. It successfully generated pages, and I could update my database.

Can you share the content of BaseCountryInfo.cs?

Showing 171 to 180 of 1343 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