• System.Security.Cryptography.CryptographicException: Keyset does not exist or Access is denied.


    If you're get one of the following exception messages in your application:

    Message: Keyset does not exist

    StackTrace:   
      
       at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
       at System.Security.Cryptography.SafeProvHandle._FreeCSP(IntPtr pProvCtx)
       at System.Security.Cryptography.SafeProvHandle.ReleaseHandle()
       at System.Runtime.InteropServices.SafeHandle.InternalFinalize()
       at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
       at System.Runtime.InteropServices.SafeHandle.Finalize()

    Message: Access is denied.

    StackTrace:  

       at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
       at System.Security.Cryptography.Utils._CreateCSP(CspParameters param, Boolean randomKeyContainer, SafeProvHandle& hProv)
       at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
       at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)
       at System.Security.Cryptography.RSA.FromXmlString(String xmlString)

     Solution:

    The application might be trying to write to the following folder path: C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

    If your application is using impersonation or using the IUSR_MACHINENAME user, then configure the MachineKeys folder sercurities and give the user Read & Execute, List Folder Contents, Read, Write.  If that doesn't work, try giving the Everyone user the same permissions.

  • 相关阅读:
    golang html/template template.ParseFiles(filenames) 相对路径问题
    深入理解jvm jdk1,7(19)
    深入理解jvm jdk1,7(18)
    深入理解jvm jdk1,7(17)
    深入理解jvm jdk1,7(16)
    深入理解jvm jdk1,7(15)
    深入理解jvm jdk1,7(14)
    hugo 制作个人博客总结
    后台管理系统总结
    pageHelper(分页插件的使用)
  • 原文地址:https://www.cnblogs.com/bayonetxxx/p/2058100.html
Copyright © 2020-2023  润新知