Hello,
We are facing Error 500 issues with API after deploying to Azure Container App. Same application using appsettings.development.json config runs fine locally. We need your help spotting any misconfigured on our end.
Failed to load API definition - 500 Internal Server Error on the /api/abp/application-configuration - Fetch error OK /swagger/v1/swagger.json
More details - source files here: https://drive.google.com/drive/folders/1P88jaMPzPbPd9HLima4ZEj1HF-GUHu9H?usp=drive_link
ABP Studio Configuration Information:
- Template: app
- Created ABP Studio Version: 2.1.0
- Current ABP Studio Version: 2.1.7
- Tiered: Yes
- Multi-Tenancy: Yes
- UI Framework: blazor-server
- Theme: leptonx
- Theme Style: system
- Theme Menu Placement: side
- Database Provider: ef
- Database Management System: sqlserver
- Separate Tenant Schema: Yes
- Mobile Framework: none
- Public Website: Yes
- Social Login: Yes
- Include Tests: Yes
- Kubernetes Configuration: Yes
- Distributed Event Bus: rabbitmq
- Use Local References: No
- Optional Modules:
- GDPR
- FileManagement
- TextTemplateManagement
- LanguageManagement
- AuditLogging
- Chat
- OpenIddictAdmin
- Selected Languages: English, French, Spanish
- Default Language: English
- Create Command: abp new Millennial -t app --tiered --ui-framework blazor-server --database-provider ef --database-management-system sqlserver --theme leptonx --separate-tenant-schema --skip-migration --skip-migrator --public-website --without-cms-kit --dont-run-install-libs --dont-run-bundling -chat -file-management
What we have tried: Validated OpenIddict Application values in DB and Admin console Validated values in AppSettings.json files
35 Answer(s)
-
0
- Solution
In ABP applications, both:
/api/abp/application-configuration/swagger/v1/swagger.json
are among the very first endpoints that hit all your infrastructure (DB, Redis, distributed cache, OpenIddict, etc.).
After deployment to Azure Container Apps, a500here almost always means environment‑specific configuration (especially Redis / cache / connection strings / certificates) is wrong.Below is a concrete checklist that matches your scenario (tiered, Redis/RabbitMQ, containers) and what we’ve seen in similar ABP support tickets.
1. Check the real exception in the API logs
First, get the HttpApi.Host container logs and look for the first stack trace that appears when you call:
https://<your-api>/api/abp/application-configuration
orhttps://<your-api>/swagger/v1/swagger.json
Typical failing components in production/container environments:
- Redis / distributed cache
- Data Protection (Redis or key ring)
- OpenIddict certificate loading
- Wrong DB connection string
Until you see that exception, the front-end 500/“Failed to load API definition” is just a symptom.
2. Fix Redis / distributed cache configuration (most common cause)
In container / cloud environments, bad Redis configuration will crash application-configuration and Swagger.
In
HttpApi.Host’s environment appsettings (for exampleappsettings.Production.jsonor the environment you set inASPNETCORE_ENVIRONMENT), you should have something like:{ "Redis": { "Configuration": "your-redis-name.redis.cache.windows.net:6380,password=YOUR_PRIMARY_KEY,ssl=True,abortConnect=False" }, "DistributedCache": { "KeyPrefix": "Millennial:" } }Key points:
- Use the full Azure Cache for Redis connection string, not just
host:port. - Make sure the port is
6380withssl=Truein Azure. - Apply the same configuration in:
HttpApi.Host(appsettings.<env>.json)DbMigrator(appsettings.<env>.json)- Any other service using Redis (AuthServer, Background workers, etc.) if present.
If you don’t actually have Redis in the Azure environment yet:
- Either provision Azure Cache for Redis and configure as above, or
- Disable Redis usage in your solution (remove AbpRedisCache / Redis DataProtection config, and use in‑memory cache for now).
A misconfigured Redis (wrong address or missing password) will usually show errors like:
NOAUTH Authentication required- socket / timeout / connection refused errors to Redis host
These will appear in the API logs right before the 500 on
/api/abp/application-configuration.
3. Make sure the environment name matches your appsettings
If your Container App has:
ASPNETCORE_ENVIRONMENT=Productionthen the app will use:
appsettings.jsonappsettings.Production.json
Common mistakes:
- Configured Redis, DB, URLs only in
appsettings.Staging.json/appsettings.Development.json, but container runs withProduction. - Or vice versa.
Ensure the environment you set in Azure Container Apps matches the file where you placed your production settings.
4. Verify App / Auth URLs for tiered Blazor Server
In the HttpApi.Host appsettings for your deployment environment:
{ "App": { "SelfUrl": "https://<your-api-container-url>" }, "AuthServer": { "Authority": "https://<your-auth-server-url-or-api-url>", "RequireHttpsMetadata": "true" }, "CorsOrigins": "https://<your-blazor-server-url>,https://<your-public-web-url>" }In the Blazor Server appsettings for the same environment:
{ "RemoteServices": { "Default": { "BaseUrl": "https://<your-api-container-url>" } }, "AuthServer": { "Authority": "https://<your-auth-server-url-or-api-url>", "RequireHttpsMetadata": "true" } }Wrong urls typically cause 401/403, not 500, but if some auth/URL‑dependent configuration runs during Application Configuration, it can contribute to failures. Validate them anyway.
5. OpenIddict certificates in containers (if your AuthServer is in the same app)
In containerized / Azure environments, development certificates like
AddDevelopmentEncryptionAndSigningCertificatecannot be used reliably. For OpenIddict you should:In your
AuthServer(or the auth-host) module’sPreConfigureServices:public override void PreConfigureServices(ServiceConfigurationContext context) { var env = context.Services.GetHostingEnvironment(); if (!env.IsDevelopment()) { PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => { options.AddDevelopmentEncryptionAndSigningCertificate = false; }); PreConfigure<OpenIddictServerBuilder>(builder => { builder.AddProductionEncryptionAndSigningCertificate( "openiddict.pfx", Environment.GetEnvironmentVariable("OPENIDDICT_CERT_PASSWORD")); // optional: set token lifetimes as needed }); } }Then:
- Mount
openiddict.pfxinto the container (volume or file copy at build/publish). - Set the password via an environment variable or Azure secret.
If certificates are misconfigured, you’ll see
CryptographicException: Keyset does not existor similar in logs. That can also result in 500s when the app tries to build application configuration (because auth/validation configuration fails).
6. Summary of what to do right now
- Get the HttpApi.Host container logs and find the first exception when hitting
/api/abp/application-configuration. - Fix Redis configuration in all appsettings for the deployment environment using the full Azure connection string.
- Ensure
ASPNETCORE_ENVIRONMENTin Azure matches the appsettings<env>you edited. - Verify
App:SelfUrl,AuthServer:Authority,RemoteServices:Default:BaseUrl, andCorsOriginsfor your Blazor Server + API + AuthServer. - If using OpenIddict in that environment, use a production PFX certificate rather than development certs.
Once the infrastructure configuration (especially Redis and connection strings) is correct,
/api/abp/application-configurationreturns 200 and Swagger will load again.
- Sources
- Application Configuration endpoint reference
(explains the/api/abp/application-configurationAPI and its role)
https://abp.io/docs/latest
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.
-
0
i already check these possible solutions but it cant work
-
0
hi
Can you share the
logs.txtof 500 Internal Server Error ?We need to see what the error is.
Thanks
-
0
I added the logs.txt file to the Google Drive
-
0
Request URL https://api.millennialinformatics.com/api/abp/application-configuration Request Method GET Status Code 500 Internal Server Error Remote Address 20.161.226.4:443 Referrer Policy strict-origin-when-cross-origin
-
0
-
0
Please check now, file name: api.millennialinformatics.com.har
-
0
hi
Can you share the
Logs.txtfile?var loggerConfiguration = new LoggerConfiguration() .MinimumLevel.Debug() .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Async(c => c.File("Logs/logs.txt"))Thanks
-
0
Could you please check now - Google Drive for Logs.txt - I wanted to make sure it is the Logs from Azure App
-
0
hi
It seems your Redis server is not working.
Can you check that Redis is connectable and working?
Thanks.
-
0
I restarted redis and it is working now - thanks
-
0
Actually it partially resolved issues - I have added more screenshot to the Google Drive - Do you think it is still redis? filename "Error500 Screenshots22"
-
0
hi
Please delete the
Logs.txtthen start your app and reproduce the 500 error and share theLogs.txtagain. Thanks. -
0
Please see it here: https://drive.google.com/file/d/1o2bLhleUmQgq8zZttKxEqFL85Mcm9Npz/view?usp=drive_link
-
0
hi, let me know if you got the latest logs - I am using azure container app for redis
-
0
hi
There are no error logs in your latest logs.txt. And the log level is not DEBUG
var loggerConfiguration = new LoggerConfiguration() .MinimumLevel.Debug() .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Async(c => c.File("Logs/logs.txt")) -
0
Hi @maliming - please check Google Drive for latest logs 1-28Logs.txt
-
0
Hi, please see the file here: https://drive.google.com/file/d/18lvGQ-s2otEocF51CPTnKRkbJF4REb50/view?usp=drive_link
thanks
-
0
hi
The logs show your Redis Server has problem. Can you check and make sure your Redis is working?
Thanks.
-
0
Hi, We have installed fresh Redis (Azure Cache for Redis) and everything seems fine with Redis and other application uses it and runs fine. But the 500 Error issue still persist. I have added latest logs again. Please assist. Thanks
https://drive.google.com/file/d/1FggJACSFaApPeQxrI52VOCLLVrTKOKk9/view?usp=drive_link
-
0
What to do about this: 2026-01-26 03:30:57.531 +00:00 [ERR] The access_token is not active.
2026-01-26 03:30:57.461 +00:00 [DBG] HealthReportCollector - health report execution history saved. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthReport history already exists and is in the same state, updating the values. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthReportCollector has completed. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthCheck collector HostedService executed successfully. 2026-01-26 03:30:57.531 +00:00 [ERR] The access_token is not active. 2026-01-26 03:30:57.532 +00:00 [INF] AuthenticationScheme: Cookies signed out. 2026-01-26 03:30:57.532 +00:00 [INF] Cookies was not authenticated. Failure message: No principal. 2026-01-26 03:30:57.532 +00:00 [INF] Executing endpoint '/Blog' 2026-01-26 03:30:57.532 +00:00 [INF] Route matched with {page = "/Blog", action = "", controller = "", area = ""}. Executing page /Blog 2026-01-26 03:30:57.532 +00:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2026-01-26 03:30:57.533 +00:00 [INF] Executing handler method Millennial.Web.Public.Pages.BlogModel.OnGetAsync - ModelState is "Valid" 2026-01-26 03:30:57.533 +00:00 [INF] Executed handler method OnGetAsync, returned result . 2026-01-26 03:30:57.533 +00:00 [INF] Executing an implicit handler method - ModelState is "Valid"
-
0
-
0
[devchase321] said: What to do about this: 2026-01-26 03:30:57.531 +00:00 [ERR] The access_token is not active.
2026-01-26 03:30:57.461 +00:00 [DBG] HealthReportCollector - health report execution history saved. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthReport history already exists and is in the same state, updating the values. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthReportCollector has completed. 2026-01-26 03:30:57.461 +00:00 [DBG] HealthCheck collector HostedService executed successfully. 2026-01-26 03:30:57.531 +00:00 [ERR] The access_token is not active. 2026-01-26 03:30:57.532 +00:00 [INF] AuthenticationScheme: Cookies signed out. 2026-01-26 03:30:57.532 +00:00 [INF] Cookies was not authenticated. Failure message: No principal. 2026-01-26 03:30:57.532 +00:00 [INF] Executing endpoint '/Blog' 2026-01-26 03:30:57.532 +00:00 [INF] Route matched with {page = "/Blog", action = "", controller = "", area = ""}. Executing page /Blog 2026-01-26 03:30:57.532 +00:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2026-01-26 03:30:57.533 +00:00 [INF] Executing handler method Millennial.Web.Public.Pages.BlogModel.OnGetAsync - ModelState is "Valid" 2026-01-26 03:30:57.533 +00:00 [INF] Executed handler method OnGetAsync, returned result . 2026-01-26 03:30:57.533 +00:00 [INF] Executing an implicit handler method - ModelState is "Valid"
Hi i check for redis and rabbit mq its working fine the main issue is when i click login form Public App or Admin App it cant redirect us to auth server and it find login page on Public app url or Admin app url so i cant understand this issue and local is working fine.
And i also uploaded new log file on Google drive
-
0
Hi i check for redis and rabbit mq its working fine the main issue is when i click login form Public App or Admin App it cant redirect us to auth server and it find login page on Public app url or Admin app url so i cant understand this issue and local is working fine.
And i also uploaded new log file on Google drive
-
0
hi
Volo.Abp.AbpException: Could not find file '~/js/swiper.js'
Please check your js file.
Thanks.

