Hi,
Is there any additional configuration required to enable cross-module entity navigation in ABP Studio?
Unfortunately, currently, there is no out-of-the-box support for cross-module entity navigation. I'll create an issue for that. But in the meantime, if you look for a workaround, you can copy the related entity metadata from your module Esone.BrandingService
(under the .suite/entities folder) and paste the related entity file (EntityName.json
) to the module Esone.AdvertisingService
and then establish 1-n relationship. But, please note that, while applying this approach, they can be missing namespaces and you may need to make some modifications.
Regards.
Hi, @EngincanV. Any update on this?
Regarding the favicon, I managed to fix it by adding the
favicon.svg
file. Previously we had only afavicon.ico
file.
Hi, sorry for the late response. I've confirmed that there is no current programmatic way for that. (Also, I created an issue with that)
Adding both favicon.svg
and favicon.ico
seems required in the current layout design.
Regards.
Which project can i implement YourCustomAttribute and also note that my Attribute will ensure that it is really image file not pdf and user just changed extension so i mean it is logic that's why i ask you which project will implement this attribute to put in mt dto which in contract project ?
Hi, yes you can create and define your attribute in the *.Application.Contracts
project. You should basically create an attribute, inherit it from the ValidationAttribute
base class of .NET, then override the IsValid
method and apply your own logic.
Btw, in one of my old project, I had similar requirements and created an AllowedExtensionsAttribute
as follows:
public class AllowedExtensionsAttribute : ValidationAttribute
{
private readonly string[] _extensions;
public AllowedExtensionsAttribute(string[] extensions)
{
_extensions = extensions;
}
protected override ValidationResult IsValid(
object value, ValidationContext validationContext)
{
if (value == null)
{
return ValidationResult.Success;
}
var file = value as IFormFile;
var extension = Path.GetExtension(file.FileName);
if (file.Length > 0 && file != null)
{
if (!_extensions.Contains(extension.ToLower()))
{
return new ValidationResult(GetErrorMessage());
}
}
return ValidationResult.Success;
}
public string GetErrorMessage()
{
return $"This extension is not allowed!";
}
}
and use the attribute:
[AllowedExtensions(new string[] { ".jpg", ".png", ".jpeg" })]
public IFormFile CoverImageFile { 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.
Reopening the question, it's closed by the support bot again.
I have resolved the issue.The problem was with the
DbTablePrefix
in 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 forDbTablePrefix
in 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.