Activities of "AliJaradat995"

Answer

I am facing an issue related to loading a signing certificate in my ABP application. I have ensured that the certificate file (authserver.pfx) is placed in the correct path. However, when attempting to read the certificate using the provided code, it fails to find the certificate at the specified path.

I have used the following code snippet to load the certificate:


private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration) { // use the following cmd to generate the file // dotnet dev-certs https --trust -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED

var fileName = "authserver.pfx";
var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
var file = Path.Combine(hostingEnv.ContentRootPath, fileName);

if (!System.IO.File.Exists(file))
{
    throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
}

return new X509Certificate2(file, passPhrase);

}


Question
  • ABP Framework version: v7.4
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace: Upon deployment, our application is encountering an error that results in an HTTP 500.30 status code. The exact error message is as follows:

2023-10-30 16:38:37.817 +03: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=7.4.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(ReadOnlySpan1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags) 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 System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) at Bsnt.NARC.Web.NARCWebModule.GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration) at Bsnt.NARC.Web.NARCWebModule.<>c__DisplayClass0_0.<PreConfigureServices>b__3(OpenIddictServerBuilder builder) 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, Action`1 optionsAction) at Bsnt.NARC.Web.Program.Main(String[] args)

And There is attachment on what error in IIS

this error in deployment

  • Steps to reproduce the issue: I have attempted the following steps to resolve the issue without success:

Server and application pool reset Creation of a new application pool Verification of permissions for certificate access and file system

  • Request for Assistance: I kindly request your urgent assistance in diagnosing and resolving this issue. The error is severely impacting our production environment, leading to downtime for our users. Please let me know if you require any additional information or if there are specific steps you would like me to take to further diagnose the problem. Thank you for your prompt attention to this matter.

Best regards,

There are no custom page codes within the permissions or roles.

Version 7.3

  • ABP Framework version: v7.4.0
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:

Specifically, I am facing problems in the Identity User Edit modal when attempting to access the Role and Permissions tabs.

Issue with Role Tab: Upon opening the Edit modal for an Identity User, I noticed that one of the roles is displaying incorrectly. It appears as described in the attached screenshot . The role is not displaying as expected, and this is causing confusion and usability problems for our users.

Problem with Localization in Permissions Tab: Additionally, there is an issue with the Localization in the Permissions tab. When accessing the Localization settings, I have observed that the translations are not rendering correctly. They seem to display text enclosed within <span> tags, as illustrated in the attached screenshot. This issue makes it challenging to work with localization settings effectively.

I kindly request your assistance in addressing these issues promptly, as they are impacting the user experience and functionality of our application.

Could you please investigate these problems and provide guidance on how to resolve them? If necessary, I am prepared to provide additional information or access to our environment to aid in troubleshooting.

  • Steps to reproduce the issue:

Issue with Role Tab:

  1. Log in to the ABP Framework application as an administrator.
  2. Navigate to the User Management section.
  3. Select an existing Identity User to edit.
  4. Click on the "Roles" tab within the Edit User modal.
  5. Observe that one of the roles is displaying incorrectly, as shown in the attached screenshot.

Problem with Localization in Permissions Tab:

  1. Log in to the ABP Framework application as an administrator.
  2. Navigate to the User Management section.
  3. Select an existing Identity User to edit.
  4. Click on the "Permissions" tab within the Edit User modal.
  5. Access the Localization settings.
  6. Observe that translations appear to be enclosed within <span> tags, as depicted in the attached screenshot.
Showing 1 to 5 of 5 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11