Base solution for your next web application
Open Closed

Cannot find module after deployment #8692


User avatar
0
darutter0508 created

I am trying to publish my app to our test site and am getting the following error when I try to run the app:

An error occurred while starting the application.

WindowsCryptographicException: Object was not found.

System.Security.Cryptography.CngKeyLite.GenerateNewExportableKey(string algorithm, int keySize)

I have checked that the System.Security.Cryptography dlls are present (the same ones that are in my development environment). I have changed the WebSiteRootAddress and RedirectAllowedExternalWebSites addresses to match what my website address is.

Please let me know if I am missing a step or have done something wrong. The documentation for deploying to IIS doesn't even mention changing these url's.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    • What is your product version?
    • What is your product type (Angular or MVC)?
    • What is product framework type (.net framework or .net core)?
    • What environment are you hosting your application?  window server with IIS? azure linux?

    May be relevant https://stackoverflow.com/questions/9951729/x509certificate-constructor-exception

  • User Avatar
    0
    darutter0508 created

    The product version is the latest as of 3/13/2020. It is a MVC Core app that I am posting to a Windows Server with IIS.

  • User Avatar
    0
    darutter0508 created

    The article from stackoverflow got the site running, but it cannot find the resources to style the pages correctly.

  • User Avatar
    0
    maliming created
    Support Team

    hi

    Are you using virtual directory?

    see https://support.aspnetzero.com/QA/Questions/7243

  • User Avatar
    0
    darutter0508 created

    It it published as a child site to our testing site. We have several sites published under www.theappprostesting.com and this is one of them. It allows us to use our SSL certificate to test new sites without registering them under a new DNS or domain.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @darutter0508

    Did you run "npm run build" command before publishing your app ?

    Thanks,