Ends in:
7 DAYS
14 HRS
30 MIN
4 SEC
Ends in:
7 D
14 H
30 M
4 S
Open Closed

Deployment to Azure Web app #6517


User avatar
0
n.uerkmez created
  • ABP Framework version: v8.0.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I get the following error after deploying the host app azure web app. The file of openiddict.pfx is available in azure web app ()

2024-01-17 11:41:23.052 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
2024-01-17 11:41:28.261 +00:00 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
 ---> System.Security.Cryptography.CryptographicException: The system cannot find the file specified.
   at System.Security.Cryptography.X509Certificates.CertificatePal.FilterPFXStore(ReadOnlySpan`1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
   at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilderExtensions.AddProductionEncryptionAndSigningCertificate(OpenIddictServerBuilder builder, String fileName, String passPhrase)
   at CommissionManagement.CommissionManagementHttpApiHostModule.<>c.<PreConfigureServices>b__0_2(OpenIddictServerBuilder serverBuilder) in C:\Projects\voba_azure\Voba_poc_001\CommissionManagement\aspnet-core\src\CommissionManagement.HttpApi.Host\CommissionManagementHttpApiHostModule.cs:line 92
   at Volo.Abp.Options.PreConfigureActionList`1.Configure(TOptions options)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
   at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   --- End of inner exception stack trace ---
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
   at CommissionManagement.Program.Main(String[] args) in C:\Projects\voba_azure\Voba_poc_001\CommissionManagement\aspnet-core\src\CommissionManagement.HttpApi.Host\Program.cs:line 37
2024-01-17 12:00:18.173 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
2024-01-17 12:00:22.207 +00:00 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
 ---> System.Security.Cryptography.CryptographicException: Access is denied.
   at System.Security.Cryptography.X509Certificates.StorePal.FromSystemStore(String storeName, StoreLocation storeLocation, OpenFlags openFlags)
   at System.Security.Cryptography.X509Certificates.X509Store.Open(OpenFlags flags)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate()
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
   at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   --- End of inner exception stack trace ---
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
   at CommissionManagement.Program.Main(String[] args) in C:\Projects\voba_azure\Voba_poc_001\CommissionManagement\aspnet-core\src\CommissionManagement.HttpApi.Host\Program.cs:line 37
2024-01-17 12:10:53.333 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
2024-01-17 12:11:00.121 +00:00 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
 ---> System.Security.Cryptography.CryptographicException: Access is denied.
   at System.Security.Cryptography.X509Certificates.StorePal.FromSystemStore(String storeName, StoreLocation storeLocation, OpenFlags openFlags)
   at System.Security.Cryptography.X509Certificates.X509Store.Open(OpenFlags flags)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate()
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
   at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   --- End of inner exception stack trace ---
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
   at CommissionManagement.Program.Main(String[] args) in C:\Projects\voba_azure\Voba_poc_001\CommissionManagement\aspnet-core\src\CommissionManagement.HttpApi.Host\Program.cs:line 37
2024-01-17 12:15:00.898 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
2024-01-17 12:15:05.642 +00:00 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
 ---> System.Security.Cryptography.CryptographicException: Access is denied.
   at System.Security.Cryptography.X509Certificates.StorePal.FromSystemStore(String storeName, StoreLocation storeLocation, OpenFlags openFlags)
   at System.Security.Cryptography.X509Certificates.X509Store.Open(OpenFlags flags)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate()
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
   at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   --- End of inner exception stack trace ---
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
   at CommissionManagement.Program.Main(String[] args) in C:\Projects\voba_azure\Voba_poc_001\CommissionManagement\aspnet-core\src\CommissionManagement.HttpApi.Host\Program.cs:line 37

21 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Access is denied.

    It seems the application unable read openiddict.pfx file

  • User Avatar
    0
    n.uerkmez created

    Thanks for quick replay.I see it. But, What is the solution?

  • User Avatar
    0
    n.uerkmez created

    I have found workaround but I came across new issue

    
    2024-01-17 18:12:45.844 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/](https://apihost-test-007.azurewebsites.net/) \- 302 null null 6570\.8489ms
    2024-01-17 18:12:45.857 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/swagger/index.html](https://apihost-test-007.azurewebsites.net/swagger/index.html) \- null null
    2024-01-17 18:12:46.046 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/swagger/index.html](https://apihost-test-007.azurewebsites.net/swagger/index.html) \- 200 null text/html;charset=utf\-8 189\.0165ms
    2024-01-17 18:12:46.197 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/api/abp/application-configuration](https://apihost-test-007.azurewebsites.net/api/abp/application-configuration) \- null null
    2024-01-17 18:12:46.197 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/swagger/v1/swagger.json](https://apihost-test-007.azurewebsites.net/swagger/v1/swagger.json) \- null null
    2024-01-17 18:12:46.210 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2024-01-17 18:12:46.249 +00:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc). 2024-01-17 18:12:48.246 +00:00 [INF] Request finished HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 2048.9194ms 2024-01-17 18:12:48.505 +00:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'. 2024-01-17 18:12:48.615 +00:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 2364.5406ms 2024-01-17 18:12:48.617 +00:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2024-01-17 18:12:48.637 +00:00 [INF] Request finished HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/api/abp/application-configuration - 200 null application/json; charset=utf-8 2440.1072ms 2024-01-17 18:12:54.031 +00:00 [INF] Request starting HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/connect/authorize?response_type=code&client_id=CommissionManagement_Swagger&redirect_uri=https%3A%2F%2Fapihost-test-007.azurewebsites.net%2Fswagger%2Foauth2-redirect.html&scope=CommissionManagement&state=V2VkIEphbiAxNyAyMDI0IDE5OjEyOjU0IEdNVCswMTAwIChNaXR0ZWxldXJvcMOkaXNjaGUgTm9ybWFsemVpdCk%3D - null null 2024-01-17 18:12:54.046 +00:00 [INF] The request URI matched a server endpoint: "Authorization". 2024-01-17 18:12:54.092 +00:00 [INF] The authorization request was successfully extracted: { "response_type": "code", "client_id": "CommissionManagement_Swagger", "redirect_uri": "https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html", "scope": "CommissionManagement", "state": "V2VkIEphbiAxNyAyMDI0IDE5OjEyOjU0IEdNVCswMTAwIChNaXR0ZWxldXJvcMOkaXNjaGUgTm9ybWFsemVpdCk=" }. 2024-01-17 18:12:55.414 +00:00 [INF] Client validation failed because 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html' was not a valid redirect_uri for CommissionManagement_Swagger. 2024-01-17 18:12:55.416 +00:00 [INF] The authorization request was rejected because the redirect_uri was invalid: 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html'. 2024-01-17 18:12:55.469 +00:00 [INF] Request finished HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/connect/authorize?response_type=code&client_id=CommissionManagement_Swagger&redirect_uri=https%3A%2F%2Fapihost-test-007.azurewebsites.net%2Fswagger%2Foauth2-redirect.html&scope=CommissionManagement&state=V2VkIEphbiAxNyAyMDI0IDE5OjEyOjU0IEdNVCswMTAwIChNaXR0ZWxldXJvcMOkaXNjaGUgTm9ybWFsemVpdCk%3D - 302 null null 1438.1375ms 2024-01-17 18:12:55.487 +00:00 [INF] Request starting HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/**Error?httpStatusCode=400 - null null 2024-01-17 18:12:55.501 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-01-17 18:12:55.511 +00:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared).
    2024-01-17 18:12:55.562 +00:00 [INF] Executing ViewResult, running view \~/Views/Error/Default.cshtml.
    2024-01-17 18:12:55.831 +00:00 [INF] Bundling \_\_bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css (1 files)
    2024-01-17 18:12:56.097 +00:00 [INF] > Minified /Views/Error/DefaultErrorComponent/default.css (230 bytes -> 168 bytes)
    2024-01-17 18:12:56.105 +00:00 [INF] Bundled \_\_bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css (168 bytes)\*\*
    2024-01-17 18:12:56.381 +00:00 [INF] Bundling \_\_bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css (18 files)
    2024-01-17 18:12:56.431 +00:00 [INF] > Minified /libs/abp/core/abp.css (1331 bytes -> 868 bytes)
    2024-01-17 18:12:56.546 +00:00 [INF] > Minified /libs/@fortawesome/fontawesome-free/css/all.css (73577 bytes -> 53572 bytes)
    2024-01-17 18:12:56.604 +00:00 [INF] > Minified /libs/@fortawesome/fontawesome-free/css/v4-shims.css (41312 bytes -> 33344 bytes)
    2024-01-17 18:12:56.718 +00:00 [INF] > Minified /libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css (54850 bytes -> 43186 bytes)
    2024-01-17 18:12:56.754 +00:00 [INF] > Minified /libs/datatables.net-bs5/css/dataTables.bootstrap5.css (13698 bytes -> 12035 bytes)
    2024-01-17 18:12:56.776 +00:00 [INF] > Minified /libs/bootstrap-daterangepicker/daterangepicker.css (8069 bytes -> 6368 bytes)
    2024-01-17 18:12:56.783 +00:00 [INF] > Minified /libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-styles.css (266 bytes -> 212 bytes)
    2024-01-17 18:12:56.789 +00:00 [INF] > Minified /libs/abp/aspnetcore-mvc-ui-theme-shared/date-range-picker/date-range-picker-styles.css (338 bytes -> 293 bytes)
    2024-01-17 18:12:56.829 +00:00 [INF] > Minified /Themes/LeptonX/Global/side-menu/libs/bootstrap-icons/font/bootstrap-icons.css (74827 bytes -> 57858 bytes)
    2024-01-17 18:12:56.869 +00:00 [INF] > Minified /Themes/LeptonX/Global/side-menu/css/js-bundle.css (35043 bytes -> 30685 bytes)
    2024-01-17 18:12:56.897 +00:00 [INF] > Minified /Themes/LeptonX/Global/side-menu/css/layout-bundle.css (34668 bytes -> 29568 bytes)
    2024-01-17 18:12:56.909 +00:00 [INF] > Minified /Themes/LeptonX/Global/side-menu/css/abp-bundle.css (3870 bytes -> 3024 bytes)
    2024-01-17 18:12:56.917 +00:00 [INF] > Minified /Themes/LeptonX/Global/side-menu/css/font-bundle.css (117 bytes -> 116 bytes)
    2024-01-17 18:12:56.927 +00:00 [INF] > Minified /global-styles.css (583 bytes -> 516 bytes)
    2024-01-17 18:12:56.929 +00:00 [INF] Bundled \_\_bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css (325317 bytes)
    
    2024-01-17 18:12:59.722 +00:00 [INF] > Minified /Pages/Account/LinkUsers/account-link-user-global.js (4816 bytes -> 2263 bytes)
    2024-01-17 18:12:59.739 +00:00 [INF] > Minified /Themes/LeptonX/Global/scripts/style-initializer.js (1637 bytes -> 750 bytes)
    2024-01-17 18:12:59.743 +00:00 [INF] Bundled \_\_bundles/LeptonX.Global.5E87075BDB3BB74AECF012FFFF580B71.js (923011 bytes)
    2024-01-17 18:12:59.767 +00:00 [INF] Executed ViewResult - view \~/Views/Error/Default.cshtml executed in 4214.4659ms.
    2024-01-17 18:12:59.768 +00:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 4255.7433ms
    2024-01-17 18:12:59.769 +00:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'
    2024-01-17 18:12:59.776 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/Error?httpStatusCode=400](https://apihost-test-007.azurewebsites.net/Error?httpStatusCode=400) \- 400 null text/html; charset=utf\-8 4288\.3517ms
    2024-01-17 18:12:59.798 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/\_\_bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?\_v=638411119769308541](https://apihost-test-007.azurewebsites.net/__bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?_v=638411119769308541) \- null null
    2024-01-17 18:12:59.802 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/\_\_bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?\_v=638411119761182821](https://apihost-test-007.azurewebsites.net/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638411119761182821) \- null null
    2024-01-17 18:12:59.805 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/\_\_bundles/LeptonX.Global.5E87075BDB3BB74AECF012FFFF580B71.js?\_v=638411119797464971](https://apihost-test-007.azurewebsites.net/__bundles/LeptonX.Global.5E87075BDB3BB74AECF012FFFF580B71.js?_v=638411119797464971) \- null null
    2024-01-17 18:12:59.807 +00:00 [INF] Sending file. Request path: '/\_\_bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css'. Physical path: 'N/A'
    2024-01-17 18:12:59.807 +00:00 [INF] Sending file. Request path: '/\_\_bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css'. Physical path: 'N/A'
    2024-01-17 18:12:59.810 +00:00 [INF] Sending file. Request path: '/\_\_bundles/LeptonX.Global.5E87075BDB3BB74AECF012FFFF580B71.js'. Physical path: 'N/A'
    2024-01-17 18:12:59.813 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/\_\_bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?\_v=638411119761182821](https://apihost-test-007.azurewebsites.net/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638411119761182821) \- 200 168 text/css 11\.0347ms
    2024-01-17 18:12:59.829 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/\_\_bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?\_v=638411119769308541](https://apihost-test-007.azurewebsites.net/__bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?_v=638411119769308541) \- 200 331890 text/css 30\.7751ms
    2024-01-17 18:12:59.835 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/Abp/ApplicationLocalizationScript?cultureName=de-DE](https://apihost-test-007.azurewebsites.net/Abp/ApplicationLocalizationScript?cultureName=de-DE) \- null null
    2024-01-17 18:12:59.848 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2024-01-17 18:12:59.851 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/Abp/ApplicationConfigurationScript](https://apihost-test-007.azurewebsites.net/Abp/ApplicationConfigurationScript) \- null null
    2024-01-17 18:12:59.862 +00:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationLocalizationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController (Volo.Abp.AspNetCore.Mvc). 2024-01-17 18:12:59.872 +00:00 [INF] Request finished HTTP/1.1 GET https://apihost-test-007.azurewebsites.net/__bundles/LeptonX.Global.5E87075BDB3BB74AECF012FFFF580B71.js?_v=638411119797464971 - 200 924442 application/javascript 62.2343ms 2024-01-17 18:12:59.878 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2024-01-17 18:12:59.887 +00:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc).
    2024-01-17 18:12:59.889 +00:00 [INF] Request starting HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/Abp/ServiceProxyScript](https://apihost-test-007.azurewebsites.net/Abp/ServiceProxyScript) \- null null
    2024-01-17 18:12:59.898 +00:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
    2024-01-17 18:12:59.905 +00:00 [INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc).
    2024-01-17 18:12:59.950 +00:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript
    2024-01-17 18:12:59.973 +00:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 106.0379ms
    2024-01-17 18:12:59.977 +00:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2024-01-17 18:12:59.987 +00:00 [INF] Request finished HTTP/1.1 GET [https://apihost-test-007.azurewebsites.net/Abp/ApplicationLocalizationScript?cultureName=de-DE](https://apihost-test-007.azurewebsites.net/Abp/ApplicationLocalizationScript?cultureName=de-DE) \- 200
    
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    redirect_uri was invalid: 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html'

    
    [INF] The authorization request was successfully extracted: 
    
    {
       "response_type":"code",
       "client_id":"CommissionManagement_Swagger",
       "redirect_uri":"https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html",
       "scope":"CommissionManagement",
       "state":"V2VkIEphbiAxNyAyMDI0IDE5OjEyOjU0IEdNVCswMTAwIChNaXR0ZWxldXJvcMOkaXNjaGUgTm9ybWFsemVpdCk="
    }
    
    Client validation failed because 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html' was not a valid redirect_uri for CommissionManagement_Swagger. 
    
  • User Avatar
    0
    n.uerkmez created

    hi

    redirect_uri was invalid: 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html'

     
    [INF] The authorization request was successfully extracted:  
     
    { 
       "response_type":"code", 
       "client_id":"CommissionManagement_Swagger", 
       "redirect_uri":"https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html", 
       "scope":"CommissionManagement", 
       "state":"V2VkIEphbiAxNyAyMDI0IDE5OjEyOjU0IEdNVCswMTAwIChNaXR0ZWxldXJvcMOkaXNjaGUgTm9ybWFsemVpdCk=" 
    } 
     
    Client validation failed because 'https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html' was not a valid redirect_uri for CommissionManagement_Swagger.  
    

    What are the actions I must take? Please step by step

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please check the OpenIddictApplications table.

    https://apihost-test-007.azurewebsites.net/swagger/oauth2-redirect.html

    The redirect_uri of CommissionManagement_Swagger must be matched.

  • User Avatar
    0
    n.uerkmez created

    Thank for clarifications. I want to automate deployment with Github actions. I followed the steps on the https://docs.abp.io/en/commercial/latest/startup-templates/application/azure-deployment/step1-create-azure-resources?UI=NG&DB=EF&Tiered=Yes#step-1-creating-an-azure-web-app-service-environment for this reason. But I am facing the following errors.

    2024-01-18 23:14:46.383 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
    2024-01-18 23:15:00.342 +00:00 [FTL] Host terminated unexpectedly!
    Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module CommissionManagement.CommissionManagementHttpApiHostModule, CommissionManagement.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
     ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Extensions.DependencyInjection.AbpSwaggerGenServiceCollectionExtensions.AddAbpSwaggerGenWithOAuth(IServiceCollection services, String authority, Dictionary`2 scopes, Action`1 setupAction, String authorizationEndpoint, String tokenEndpoint)
       at CommissionManagement.CommissionManagementHttpApiHostModule.ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/CommissionManagementHttpApiHostModule.cs:line 245
       at CommissionManagement.CommissionManagementHttpApiHostModule.ConfigureServices(ServiceConfigurationContext context) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/CommissionManagementHttpApiHostModule.cs:line 143
       at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       --- End of inner exception stack trace ---
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
       at CommissionManagement.Program.Main(String[] args) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/Program.cs:line 36
    2024-01-18 23:41:19.380 +00:00 [INF] Starting CommissionManagement.HttpApi.Host.
    2024-01-18 23:41:32.343 +00:00 [FTL] Host terminated unexpectedly!
    Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module CommissionManagement.CommissionManagementHttpApiHostModule, CommissionManagement.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
     ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Extensions.DependencyInjection.AbpSwaggerGenServiceCollectionExtensions.AddAbpSwaggerGenWithOAuth(IServiceCollection services, String authority, Dictionary`2 scopes, Action`1 setupAction, String authorizationEndpoint, String tokenEndpoint)
       at CommissionManagement.CommissionManagementHttpApiHostModule.ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/CommissionManagementHttpApiHostModule.cs:line 245
       at CommissionManagement.CommissionManagementHttpApiHostModule.ConfigureServices(ServiceConfigurationContext context) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/CommissionManagementHttpApiHostModule.cs:line 143
       at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       --- End of inner exception stack trace ---
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
       at CommissionManagement.Program.Main(String[] args) in /home/runner/work/voba-to-azure/voba-to-azure/aspnet-core/src/CommissionManagement.HttpApi.Host/Program.cs:line 36
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Object reference not set to an instance of an object. at Microsoft.Extensions.DependencyInjection.AbpSwaggerGenServiceCollectionExtensions.AddAbpSwaggerGenWithOAuth(IServiceCollection services, String authority, Dictionary2 scopes, Action1 setupAction, String authorizationEndpoint, String tokenEndpoint)

    Please share the call code of AddAbpSwaggerGenWithOAuth?

    Make sure configuration["AuthServer:Authority"] has a value in appsettings.json.

  • User Avatar
    0
    n.uerkmez created
    private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddAbpSwaggerGenWithOAuth(
            configuration["AuthServer:Authority"]!,
            new Dictionary<string, string>
            {
                    {"CommissionManagement", "CommissionManagement API"}
            },
            options =>
            {
                options.SwaggerDoc("v1", new OpenApiInfo { Title = "CommissionManagement API", Version = "v1" });
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.FullName);
                options.HideAbpEndpoints();
            });
    }
    

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Is there an appstitiongs.json file in Azure, and does AuthServer:Authority exist in it?

  • User Avatar
    0
    n.uerkmez created

    Yes. It exists

  • User Avatar
    0
    n.uerkmez created

    I think I found the main cause of the problem. It seems that when the ABP Host app is running on ubuntu linux, unfortunately it cannot find the (appsettings) files, even though the files exist. Is there a configuration that needs to be done for Linux?

    License code is already exists. (Related to the issue mentioned above )

  • User Avatar
    0
    jfistelmann created

    may it be that you deployed a debug build and not a release build? As far as I know, license checks like this are not performed when running a published application 🤔

  • User Avatar
    0
    n.uerkmez created

    Thanks for replay. I wish it was as you mentioned, but I have checked the deployment.yaml file and I explicitly specified it as -release.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please add some test code to Program.cs of apihost to check the appsettngs.json,appsettngs.secrets.json files.

    You can try to read the file content.

  • User Avatar
    0
    n.uerkmez created

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    If the files exist in /home/site/wwwroot. I'm not sure about the cause of the problem. Could it be permission?

  • User Avatar
    0
    n.uerkmez created

    hi If the files exist in /home/site/wwwroot. I'm not sure about the cause of the problem. Could it be permission?

    As far as I found out, in linux the host app ignores the /apihost/ directory when running on, for example, wwwroot/apihost/projectname.HttpApi.Host.dll. It acts as if it is running directly under wwwroot. Therefore it cannot find all appsetting.json under wwwroot/apihost/.

    I also deployed the application directly under wwwroot, but the error still occurred.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Sorry, There's nothing I can do about it because your code can't read the file.

  • User Avatar
    0
    n.uerkmez created

    Is there any way to set a working directory for the host app?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It might be azure's configuration, I don't know about that.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06