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);

}


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

Version 7.3

Showing 1 to 3 of 3 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11