Activities of "EngincanV"

As i expected, all tables from services not using specific connection string should be included in the Default database. Did I miss any configuration or is this the expected behavior?

Hi, normally in a layered architecture, it's like you expected. But in the microservice architecture, since we have services for each module, we already define connection strings for them, and they point to the related service. So, this is the reason, when you use the Default connection string there are some missing tables. (If you check the ConfigureDatabases method of each service, you can see that)

So, in your case, you should either define each service connection string per tenant or use the shared database option.

Answer

Hi, we fixed this problem a long time ago. We moved the related database migration logic to OnPreApplicationInitializationAsync method and didn't add any conditions like in the figure you shared:

In your code, you can remove the environment condition, it's wrong as you said.

Regards.

Hi, we have introduced a new feature called Idle Session Timeout, and it seems this is what you are looking for: https://abp.io/docs/latest/modules/account/idle-session-timeout

This feature was introduced in v9.1, so in your version, it can not be used. And I guess you can't update your version, so I can explain you what this feature does, and how it works, so maybe you can implement it your own project:

  1. We created an AccountIdleViewComponent and added it as a layout hook, so we can show a dialog to warn users, when the inactivity is detected, and they should either confirm the model to stay signed it or do nothing to be logged out automatically.
  2. We also created a js file that is added with the component, so we can check for the inactivity by using JS API, and then show the hidden component/model in the page, to warn the user.
  3. We also created a setting group, so admins can decide the inactivity period, but in your case, you can make it hardcoded and check for 30 seconds.

Regards.

Here in your example url is to application url. Did you ment auth-server URL? And is correct url in auth server Account/logout?

Actually, I just tried to indicate that if you have a post-logout URL, then it should be registered to the related table. But, you can forget the related sentence, which causes confusion.

And what makes auth server to forget __tenant.

I'm not an angular developer but your app's logout, using authService.logout(), should redirect the user to your auth server's logout endpoint. When they completely log out, then the __tenant cookie should be deleted. So, you can pass to the logout page a returnUrl to your login page, and then they can see your login page, and either select a tenant or directly login as a host user.

Answer

Hi, unfortunately, the image quality is not good enough to be seen in the related code. So, can you please share it as a code or send a better image?

Regards.

Answer

I have created the A.sln solution using ABP Studio (which includes AuthServer, HostApi, and Web). A.sln is my host application. Next, I need to create the B.sln solution, which is my Module. I need to install Module B into Solution A. I would like to use the NuGet method to install the module. How can I publish Module B to the NuGet dropdown list in ABP Studio? By default, the NuGet list does not include my module (please refer to the screenshot attached).

Hi, in the NuGet tab, we only list ABP's own modules, so it can be directly added to the related layers into your solution. So, if your ModuleB is published in NuGet, then you should add it yourself.

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.

Showing 181 to 190 of 1370 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.1.0-preview. Updated on November 04, 2025, 06:41