locked
Certificate file problem RRS feed

  • Question

  • Hello everyone

    I got some problems with security. I develop a healthvault web application, and use 'HealthVault Application Manager.exe' to create a certificate file. I try to put this web app on sever, and allows someone could use it. But when the user connect to this web app, it will throws the following errors.  What reason cause this error  ??

     

    Server Error in '/' Application.

    Security Exception

    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

    Exception Details: System.Security.Cryptography.CryptographicException: An internal error occurred.


    Source Error: 

    [No relevant source lines]

    Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6e15d021\dc54b0fd\App_Web_5umfukuj.1.cs    Line: 

    Stack Trace: 

    [CryptographicException: An internal error occurred.
    ]
      System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) +33
      System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0
      System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) +237
      System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) +131
      Microsoft.Health.ApplicationConfiguration.GetApplicationCertificateFromFile(String certFilename) in e:\src\hsmain\private\prod\src\sdk\core\ApplicationConfiguration.cs:746
    
    [SecurityException: Error loading certificate. Is password specified using ApplicationCertificatePassword?]
      Microsoft.Health.ApplicationConfiguration.GetApplicationCertificateFromFile(String certFilename) in e:\src\hsmain\private\prod\src\sdk\core\ApplicationConfiguration.cs:754
      Microsoft.Health.ApplicationConfiguration.GetApplicationCertificate(Guid applicationId, StoreLocation storeLocation, String certSubject) in e:\src\hsmain\private\prod\src\sdk\core\ApplicationConfiguration.cs:628
      Microsoft.Health.ApplicationConfiguration.get_ApplicationCertificate() in e:\src\hsmain\private\prod\src\sdk\core\ApplicationConfiguration.cs:583
      Microsoft.Health.HealthApplicationConfiguration.get_ApplicationCertificate() in e:\src\hsmain\private\prod\src\sdk\core\HealthApplicationConfiguration.cs:130
      Microsoft.Health.Web.WebApplicationUtilities.GetPersonInfo(String authToken, Guid appId) in e:\src\hsmain\private\prod\src\sdk\web\WebApplicationUtilities.cs:1726
      Microsoft.Health.Web.WebApplicationUtilities.HandleTokenOnUrl(HttpContext context, Boolean isLoginRequired, Guid appId) in e:\src\hsmain\private\prod\src\sdk\web\WebApplicationUtilities.cs:1752
      Microsoft.Health.Web.WebApplicationUtilities.PageOnPreLoad(HttpContext context, Boolean logOnRequired, Boolean isMra, Guid appId) in e:\src\hsmain\private\prod\src\sdk\web\WebApplicationUtilities.cs:308
      Microsoft.Health.Web.HealthServicePage.OnPreLoad(EventArgs e) in e:\src\hsmain\private\prod\src\sdk\web\HealthServicePage.cs:133
      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
      System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
      System.Web.UI.Page.ProcessRequest() +80
      System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
      System.Web.UI.Page.ProcessRequest(HttpContext context) +49
      ASP.redirect_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6e15d021\dc54b0fd\App_Web_5umfukuj.1.cs:0
      System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
      System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

    Wednesday, May 26, 2010 8:47 AM

Answers

All replies