I have setup release pipeline and deployment for staging environment in Azure Devops Deployment using IIS to host services and web applications.
In development enviroment I have been using Aspire to raise environment. To my understanding, Services are responsible for updating and seeding their instances.
However, issue is that in Staging environment for some reason undersettings I am not seeing Account/Chat features. Looking at tables in Administration database between two instances
SELECT COUNT() AS PermissionGroups FROM dbo.AbpPermissionGroups; SELECT COUNT() AS Permissions FROM dbo.AbpPermissions; SELECT COUNT() AS SettingDefinitions FROM dbo.AbpSettingDefinitions; SELECT COUNT() AS FeatureGroups FROM dbo.AbpFeatureGroups; SELECT COUNT(*) AS Features FROM dbo.AbpFeatures;
SELECT [Name] FROM dbo.AbpPermissionGroups WHERE [Name] LIKE '%Chat%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpPermissionGroups WHERE [Name] LIKE '%Account%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpPermissions WHERE [Name] LIKE '%Chat%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpPermissions WHERE [Name] LIKE '%Account%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpSettingDefinitions WHERE [Name] LIKE '%Chat%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpSettingDefinitions WHERE [Name] LIKE '%Account%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpFeatures WHERE [Name] LIKE '%Chat%' ORDER BY [Name]; SELECT [Name] FROM dbo.AbpFeatures WHERE [Name] LIKE '%Account%' ORDER BY [Name];
staging results in 0 data found. Dev Local - Has data.
Attached solution DELETED
I have tried everything I can think of.
Please help!
2 Answer(s)
-
0
- In the microservice template, the Administration service is the one that maintains/seeds the Administration database (permissions, features, settings, etc.). If, in staging, you see 0 rows in
AbpPermissionGroups,AbpPermissions,AbpSettingDefinitions,AbpFeatureGroups,AbpFeatures, it means the Administration DB migrator/seeding didn’t run against that staging database (or it ran against a different connection string/database). - Also, even when seeding is correct, distributed cache (Redis) can cause the UI to keep showing “missing” permission/feature/setting definitions until the cache is cleared.
Do this in your Azure DevOps release (staging) as a definitive fix:
Run the Administration DbMigrator against the staging database
- In your pipeline, add a step that executes the AdministrationService.DbMigrator (or whatever your solution’s migrator executable is for the Administration service) on every deployment (or at least on first deployment).
- Ensure the migrator uses the same connection string that your staging Administration service uses.
- After it runs, re-check the tables you listed; they should no longer be empty.
Restart the Administration service after migrator/seeding
- The Administration service is responsible for publishing/serving these management definitions and keeping the schema/data aligned.
If you use Redis (distributed cache), clear it
- In microservice setups, permission/feature/setting definition data is cached. If you seeded data but the UI still doesn’t show Account/Chat (or the permission dialogs are missing groups), clearing Redis typically resolves it.
- Clear Redis, then restart the related services (Administration + the UI/gateway you use).
Verify you are not accidentally pointing staging to a different DB
- Since your staging DB has zero definition rows, the most common root cause is a connection string mismatch: the service is pointing to DB-A, but you are inspecting DB-B (or the migrator points to DB-B and the service points to DB-A). Make the pipeline set exactly one connection string source for both runtime and migrator.
Links (verified):
- https://abp.io/docs/latest/solution-templates/microservice/microservices
- https://abp.io/docs/latest/solution-templates/microservice/permission-management
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - In the microservice template, the Administration service is the one that maintains/seeds the Administration database (permissions, features, settings, etc.). If, in staging, you see 0 rows in
-
0
Please forward to Human support.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)