Open Closed

HTTP Error 500.30 - ASP.NET Core app failed to start #8541


User avatar
0
sayedzakaria created

Single layerd project

  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): noi created opendict cert using this command dotnet dev-certs https -v -ep ndacert.pfx -p 7516623d-19f1-4839-bdbd-2ec4821ed811 and appsettings file is { "App": { "SelfUrl": "https://ndaapi.databand.sa", "ClientUrl": "https://ndaform.databand.sa", "CorsOrigins": "https://*.databand.sa,https://ndaform.databand.sa,https://ndaclient.databand.sa", "RedirectAllowedUrls": "https://ndaform.databand.sa" }, "ConnectionStrings": { "Default": "User Id=sa;Password=sa5000;Initial Catalog=DataBandNDADB;Data Source=.;TrustServerCertificate=True" }, "AuthServer": { "Authority": "https://ndaapi.databand.sa", "SwaggerClientId": "databandNDA_Swagger", "CertificatePassPhrase": "7516623d-19f1-4839-bdbd-2ec4821ed811" }, "StringEncryption": { "DefaultPassPhrase": "KArdOQgZyqyZN6gg" }, "OpenIddict": { "Applications": { "databandNDA_App": { "ClientId": "databandNDA_App", "RootUrl": "https://ndaform.databand.sa" }, "databandNDA_Swagger": { "ClientId": "databandNDA_Swagger", "RootUrl": "https://ndaapi.databand.sa" } } } }

and i use it PreConfigure<OpenIddictServerBuilder>(serverBuilder => { serverBuilder.AddProductionEncryptionAndSigningCertificate("ndacert.pfx", configuration["AuthServer:CertificatePassPhrase"]!);

});

2024-12-26 11:29:53.233 +03:00 [FTL] databandNDA terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=9.0.2.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.X509CertificateLoader.ImportPfx(ReadOnlySpan1 data, ReadOnlySpan1 password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12NoLimits(ReadOnlyMemory1 data, ReadOnlySpan1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12Return& earlyReturn) at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12(ReadOnlyMemory1 data, ReadOnlySpan1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits) at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadFromFile[T](String path, ReadOnlySpan1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits, LoadFromFileFunc1 loader) at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12PalFromFile(String path, ReadOnlySpan1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits) at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlobOrFile(ReadOnlySpan1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilderExtensions.AddProductionEncryptionAndSigningCertificate(OpenIddictServerBuilder builder, String fileName, String passPhrase, Nullable1 flag) at databandNDA.databandNDAModule.<>c__DisplayClass1_0.<PreConfigureServices>b__3(OpenIddictServerBuilder serverBuilder) in C:\agent\_work\15\s\DataBandNDA\databandNDAModule.cs:line 146 at Volo.Abp.Options.PreConfigureActionList1.Configure(TOptions options) at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options) at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c__DisplayClass1_0.<AddOpenIddictServer>b__0(OpenIddictServerBuilder builder) at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action1 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, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction) at databandNDA.Program.Main(String[] args) in C:\agent_work\15\s\DataBandNDA\Program.cs:line 52


3 Answer(s)
  • User Avatar
    0
    sayedzakaria created

    the problem was in iis Go to IIS Manager Go to the application pool instance Click advanced settings Under Process model, set Load User Profile to true

    i have a problem with login when i click on login button 400 Error An internal error occurred during your request!

  • User Avatar
    0
    sayedzakaria created

    the log file 2024-12-26 12:01:55.081 +03:00 [INF] The authentication demand was rejected because the client application was not found: 'databandNDA_App'. 2024-12-26 12:01:55.083 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/connect/authorize?response_type=code&client_id=databandNDA_App&state=MkxLNnptY3R2ekpqTkwyVlF0TVBjSHEwZEM1ZlJiZWo1MUpvd2x2bUJjQ3pr&redirect_uri=https%3A%2F%2Fndaform.databand.sa&scope=openid%20offline_access%20databandNDA&code_challenge=VxTHxed4CHeSFGEeXTXnguxQKA0nyE1BQLiQZXQC0mM&code_challenge_method=S256&nonce=MkxLNnptY3R2ekpqTkwyVlF0TVBjSHEwZEM1ZlJiZWo1MUpvd2x2bUJjQ3pr&culture=en&ui-culture=en - 302 null null 35.9775ms 2024-12-26 12:01:55.279 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/Error?httpStatusCode=400 - null null 2024-12-26 12:01:55.281 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-12-26 12:01:55.281 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[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-12-26 12:01:55.282 +03:00 [INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml. 2024-12-26 12:01:55.289 +03:00 [INF] Executed ViewResult - view ~/Views/Error/Default.cshtml executed in 6.9756ms. 2024-12-26 12:01:55.289 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 8.2255ms 2024-12-26 12:01:55.289 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-12-26 12:01:55.290 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/Error?httpStatusCode=400 - 400 null text/html; charset=utf-8 10.5898ms 2024-12-26 12:01:55.514 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/__bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?_v=638708003795576628 - null null 2024-12-26 12:01:55.514 +03:00 [INF] The file /__bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css was not modified 2024-12-26 12:01:55.515 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/__bundles/LeptonX.Global.3253AE0A9501A0665DAC7014DA5B2ED8.css?_v=638708003795576628 - 304 null text/css 0.7434ms 2024-12-26 12:01:55.516 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/Abp/ApplicationConfigurationScript - null null 2024-12-26 12:01:55.517 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.518 +03:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc). 2024-12-26 12:01:55.525 +03:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2024-12-26 12:01:55.525 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 7.438ms 2024-12-26 12:01:55.525 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.525 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/Abp/ApplicationConfigurationScript - 200 5966 application/javascript 9.1624ms 2024-12-26 12:01:55.526 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638708003786374757 - null null 2024-12-26 12:01:55.527 +03:00 [INF] The file /__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css was not modified 2024-12-26 12:01:55.527 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638708003786374757 - 304 null text/css 0.4088ms 2024-12-26 12:01:55.527 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/Abp/ServiceProxyScript - null null 2024-12-26 12:01:55.528 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.528 +03: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-12-26 12:01:55.535 +03:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2024-12-26 12:01:55.535 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 7.4062ms 2024-12-26 12:01:55.535 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.536 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/Abp/ServiceProxyScript - 200 31710 application/javascript 8.9634ms 2024-12-26 12:01:55.536 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/Abp/ApplicationLocalizationScript?cultureName=en - null null 2024-12-26 12:01:55.537 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.537 +03: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-12-26 12:01:55.542 +03:00 [INF] Request starting HTTP/2 GET https://ndaapi.databand.sa/__bundles/LeptonX.Global.4D60287B5E73BF5E2630D6B5AE4750A8.js?_v=638708003801887975 - null null 2024-12-26 12:01:55.542 +03:00 [INF] The file /__bundles/LeptonX.Global.4D60287B5E73BF5E2630D6B5AE4750A8.js was not modified 2024-12-26 12:01:55.542 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/__bundles/LeptonX.Global.4D60287B5E73BF5E2630D6B5AE4750A8.js?_v=638708003801887975 - 304 null application/javascript 0.7487ms 2024-12-26 12:01:55.543 +03:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2024-12-26 12:01:55.543 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 6.2035ms 2024-12-26 12:01:55.543 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2024-12-26 12:01:55.544 +03:00 [INF] Request finished HTTP/2 GET https://ndaapi.databand.sa/Abp/ApplicationLocalizationScript?cultureName=en - 200 60075 application/javascript 8.2286ms

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hello

    Can you please check this similar issue https://abp.io/support/questions/8217/SystemSecurityCryptographyCryptographicException-The-system-cannot-find-the-file-specified it will helps you.

    Thank you.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37