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);
}
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(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 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, 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, Action1 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 Bsnt.NARC.Web.Program.Main(String[] args)
And There is attachment on what error in IIS
this error in deployment
Server and application pool reset Creation of a new application pool Verification of permissions for certificate access and file system
Best regards,
There are no custom page codes within the permissions or roles.
Version 7.3
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.
Issue with Role Tab:
Problem with Localization in Permissions Tab: