I have resolved the issue.The problem was with the
DbTablePrefixin both Solution A and Module B.I had setpublic static string DbTablePrefix { get; set; } = "";which caused the table prefix to be empty.As a result,when generating the code and creating tables in Solution A,it attempted to create tables with the same names twice,leading to duplicate table names and failure in creating migrations.The solution was to set different values forDbTablePrefixin Solution A and Module B.
Good catch! Regards.
Hi, https://abp.io/qa/questions/9266/3a19c279-d6b1-c6b8-77ca-a427e652e7d1 did you try is this the root cause? I'll try it today but if you already tried, maybe it might be the reason, can you confirm?
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.
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:
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.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.
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.
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.