none
Sharepoint on Premise Hight Trust Apps : System.Security.Cryptography.CryptographicException: The system cannot find the file specified.

    Question

  • Hi I am getting the following error navigating to my provider hosted app:


    The system cannot find the file specified.
     
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

     Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.


    Source Error:


     An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    Stack Trace:



    [CryptographicException: The system cannot find the file specified.
    ]
       System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) +41
       System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName) +0
       System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) +167
       System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) +84
       Intranet.ProviderHostedAppsWeb.TokenHelper..cctor() +926

    [TypeInitializationException: The type initializer for 'Intranet.ProviderHostedAppsWeb.TokenHelper' threw an exception.]
       Intranet.ProviderHostedAppsWeb.TokenHelper.IsHighTrustApp() +24
       Intranet.ProviderHostedAppsWeb.SharePointContextProvider..cctor() +10

    [TypeInitializationException: The type initializer for 'Intranet.ProviderHostedAppsWeb.SharePointContextProvider' threw an exception.]
       Intranet.ProviderHostedAppsWeb.SharePointContextProvider.CheckRedirectionStatus(HttpContext httpContext, Uri& redirectUrl) +0
       Intranet.ProviderHostedAppsWeb.Default.Page_PreInit(Object sender, EventArgs e) +43
       System.Web.UI.Page.PerformPreInit() +49
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844

     

    • Edited by jenasas Tuesday, March 18, 2014 9:27 PM
    Tuesday, March 18, 2014 9:27 PM

Answers