Open Closed

Project Deployment issue #9966


User avatar
0
vikasgupta created

We have developed an application using the Layered Application template with Angular as the UI framework.

For deployment, we followed the documentation at the below link: https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/deployment-iis?UI=…

We successfully published the backend project and hosted it on IIS. However, we are encountering an OpenIddict-related error.

I have attached the error details in a image file for your review. Could you please check and suggest a solution?


1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • The error in your screenshot is caused by the application not being able to find or access the OpenIddict signing certificate file (PFX) or its private key when running under IIS. This is a common deployment issue for ABP applications using OpenIddict.

    To resolve this:

    1. Ensure the certificate file (e.g., openiddict.pfx) is present in your published output directory on the server.
    2. Make sure the certificate password in your configuration matches the actual certificate.
    3. Grant the IIS Application Pool identity read access to the certificate file.
    4. Set "Load User Profile" to "True" for your IIS Application Pool. This is required for loading user-level certificates.
    5. When calling AddProductionEncryptionAndSigningCertificate, specify the correct X509KeyStorageFlags to avoid permission issues:
    PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
       {
           var flag = X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.EphemeralKeySet;
           serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "YourCertificatePassword", flag);
       });
    
    1. If you need to generate a new certificate, use:
    dotnet dev-certs https -v -ep openiddict.pfx -p YourCertificatePassword
    
    1. For more details and troubleshooting, see the official ABP documentation and community article below.

    Sources:

    • https://abp.io/community/articles/0znavo8r
    • https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/openiddict-deployment

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

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.1.0-preview. Updated on October 02, 2025, 08:00