System.Security.Cryptography.CryptographicException -объект уже существует

public RSAKeyPair()
    {
        string keyContainerName="pEncKey"
        CspParameters cspp = new CspParameters();
        cspp.Flags = CspProviderFlags.UseMachineKeyStore;
        cspp.KeyContainerName = keyContainerName;
        try
        {
            m_RSA = new RSACryptoServiceProvider(1024, cspp);
        }
        catch(Exception e){}
    }

в чем причина выдачи следующего исключения:

  System.Security.Cryptography.CryptographicException - object already exist 

трассировка стека выглядит следующим образом:

   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(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.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
   at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters)
   at XXXXXXXX.Core.RSAKeyPair..ctor(String keyContainerName)
8
задан DevT 1 July 2014 в 06:15
поделиться