Activities of "ahmetfarukulu"

thank you for the replies, but the problem is not related with Impersonation, i can not login without impersonation either. Also When i dataseed it like microservice project, everything works fine. So i still think the problem is related with data seeding.

Can you select the AbpUsers table you should see the admin user with related TenantId information if not then this is the reason why you can't login. Probably when you use IDataSeeder it cannot find the IdentityDataSeedContributor because your host application doesn't take dependency to Identity.Domain layer.

In this picture you select the AbpPermissionGrants table however even admin role created for related tenant doesn't mean admin user created. Also when you try to impersonate or directly login there should be some logs on Authentication Host.

For the localization, i believe it is sth related with redis cache invalidation as you mentioned.One thing bothering me though, if i restart the microservice every localization is gone, redis is still running and old cache values are still there. Why all the localizations are gone then? Is Abp deleting all the localizations in cache and recreating everything from scratch? Even if it is like that i wouldn't expect this behavior.

And why the main module can not get the microservice resource name from the cache?

When application start, it check the localization resources by md5 result if changes occurs then it try to update inserted resource. If both application use different key prefix that would be a reason for main module cannot get the microservice localization files from the cache.

Why it doesn't get the resource from the main app i wonder?

Angular application uses the Application Localization endpoint, and if host applications have a dependency on language management, they can retrieve external resources from the database. However, when host applications start, they try to insert their localization resources into the database, and if an application takes the distributed lock, other applications have to wait. That's why the localization insertion process takes time for all applications, and afterwards, you need to wait for cache invalidation, or you can simply remove the cache to get the latest localization resources from the database.

And one more thing maybe it can help. I have added custom error handler to the angular app. the error i am getting is 403. But this doesn't come from http request. Dont know where it comes from.

it is not an instance of http request as you can see.

I think the problem is not related to the data seeder; it's related to impersonation. You can follow the documentation steps. When you try to log in without impersonation, you can. If you want to login with impersonation basically, you need to set impersonation tenant permission on the authentication server configure service method.

        Configure<AbpAccountOptions>(options =>
        {
            options.TenantAdminUserName = "admin";
            options.ImpersonationTenantPermission = SaasHostPermissions.Tenants.Impersonation;
            options.ImpersonationUserPermission = IdentityPermissions.Users.Impersonation;
        });

When i try with idataseeder, it also seems working at first look, but when you try to login to angular app with the admin user of the tenant, it is redirecting to error page.No errors on the server side. How can i find out what is going wrong on the angular side? my intuition is user doesn't have any permissions so it redirects you to error page. But i will do more thorough tests, and get back to you.

If the user doesn't have any permission, then the AbpPermissionGrants table shouldn't have any record for the created tenant admin role. I've created an Angular microservice test application, and it's still working as expected. You can open DevTools (Right-click and inspect) and see the network tab to observe what's happening on the Angular side.

My Project was a monolith project. Since it is modular now i am trying to change one of the modules to microservice. Do you have any project that i can look into? or a guide how to convert your module to microservice? What should be the dependencies for the host project of the module. What should be the dependencies for domain and infrastructure layer?

There isn't any guide however you can inspect the microservice template.

  • First you can create a shared project layer for host(microservice) applications. There is folder named as shared in microservice template.
  • You can create service folder to the root and create a subfolder for each microservices.
  • Afterwards you can create an empty asp.net core application
    • Give the related dependencies such as shared projects and module that you wanna host. You can inspect the microservice/services. For module dependency Application, HttpApi, EntityFrameworkCore or MongoDB references should enough.
    • Create a module class
    • Create a DbMigrations.

if i uncomment the lines that is commented(if i revert it like in microservice template), it works fine. What can be the reason i wonder? and i can see the permissions that is seeded in db for newly created tenant. (for idataseeder)

You can use the IDataSeeder just like monolith application templates if you want. However, we explicitly seed data for each microservice because a race condition could occur during the seeding process. For example, every microservice has a dependency on the Permission Entity Framework package. When it tries to retrieve a list of existing permissions in PermissionDataSeeder, two or more microservices execute the same point and insert the same permissions. IDataSeeder collects all contributors, and we can't limit the contributor types easily. That's why creating a custom seeding for each microservice is a more suitable solution.

I created an empty microservice project and changed the data seeder just like you did. When I create the new tenant, there isn't any problem; everything works as expected. Can you share the logs when you get the exception?

I removed DynamicLocalizationResourceContributor from both hosts. So i was suspicious about that, but even if revert it and try it again. It doesn't work. On application start if redis cache is empty, it gets it from db and hold it in the server memory i guess. The problem is related with redis i believe? and if i remove DynamicLocalizationResourceContributor does it mean it longer use Redis? or it doesn't write to redis or it doesn't read or write to redis?

When the application starts, it tries to save existing localization files to the AbpLocalizationTexts table and caches these files in Redis. So, if you run both applications and clear the cache afterward, you can run one of your applications, and there shouldn't be any problem; all localizations are already inserted into the database, and it caches all localizations as expected. Make sure both application has Language Managemet Entity Framework dependency.

dotnet nuget locals all --clear

hi ahmetfarukulu

“D:\Packages” consist of 0.65 package

Execute dotnet nuget locals all --clear command.

Restart ABP Studio, the exception still exists.

Did you set the environment variable? You can see the current value with Write-Host $Env:NUGET_PACKAGES or you can set it with setx /M NUGET_PACKAGES D:\Packages PowerShell commands.

hi berkansasmaz

1.ABP Studio Version. 0.6.5

2.Extension Version (you can find this information from the Extensions button in the Tools section under the File Menu). 3.Screenshot of the contents of the volo.abp.studio.extensions.standardsolutiontemplates folder in the resulting path when you run the dotnet nuget locals global-packages --list command.

3.When you open the application, do you see any warning that the extension could not be loaded or installed? yes

4.Does the problem persist after logout from ABP Studio and log in again? yes

5.Operating system Win10 x64

Hi @zhaof,

I'm also using NuGet global packages on the D drive; however, I can't reproduce the problem. When you open the D:\Packages\volo.abp.studio.extensions.standardsolutiontemplates path in File Explorer, can you see any version folders, specifically 0.6.5? If you can't find a folder named volo.abp.studio.extensions.standardsolutiontemplates in D:\Packages, probably you didn't set the NUGET_PACKAGES environment variable as explained here. You can set it with the setx /M NUGET_PACKAGES D:\Packages PowerShell command. If the problem persists, maybe the NuGet cache is causing it. You can clear the cache with the dotnet nuget locals all --clear command.

Could you specify which services are causing the CORS exceptions?

auditlogging didn't work on production, I have seen only the administration service is available in the CORS, I added other services but still there is no log on my dashboard and I get connection timeout in the pod's log.
also allowed redirect URL for authserver not contains gateways so we can't authorize to make api call with swaggerUI,

EDIT: I found another problem with auditlogging. the connection string is not implemented in authserver's deployment chart.
Also SaasService connection string, so tenant login will fail.

Audit logging service should work as expected. Which application did you mention regarding CORS settings? Typically, you don't need to configure CORS, as only browsers check CORS settings, and only gateway and authentication server applications really require it.

  • For example, an Angular application is a single-page application (SPA) that sends requests from the browser to the gateway application, necessitating proper gateway CORS configuration.
  • Similarly, when you log in from Swagger and redirect to the Swagger main page, it sends a request to the token endpoint from the browser to the authentication server. Therefore, if you want to authorize through the service application swagger, you should also configure CORS in the AuthServer application, which it already does.
  • For OpenIddict configuration, it looks at the database, so you don't need to add to RedirectAllowedUrls.

The authentication server requires Saas and AuditLogging connection strings, which will be fixed in the new version. Thank you for notifying us.

You did a great job and added important modules to the Microservices Studio template. thank you so much. But I did not understand why CMSKit is not present in these packages. Is this module not compatible with this structure? Also, helm charts are not configured properly and if you deploy with default settings, some requests from modules will be rejected by CORS.

Thank you for the positive feedback. We have a task to make CMS Kit optional for templates in our backlogs. Could you specify which services are causing the CORS exceptions?

ABP Studio CLI is installed automatically when you install ABP Studio.

from cli, abpc command line is not found. Please let us know what we are missing.

We create issues for:

  • ABP Commercial CLI not found.
  • Internal error during project creation.

It will be fixed in the next version.

Showing 21 to 30 of 32 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13