an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Installation > Paypal integration gives this Error:::: Key not...
Last Post 9/7/2009 1:48:02 PM By lukezy. 1 replies.
9/7/2009 1:30:37 PM
parmarhimanshu
Posts: 1
Joined: 4/22/2009
Paypal integration gives this Error:::: Key not valid for use in specified state.
<span> 

Server Error in '/WEB' Application. <hr width="100%" color="#c0c0c0" size="1" />

Key not valid for use in specified state.

</span>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: Key not valid for use in specified state.


Source Error:

<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td>
Line 73:     public CreditCard CreditCard {
Line 74:         get {
Line 75:             return new CreditCard(SaveAs, CardTypeId, CardNumber, CardholderName, ExpireYear, ExpireMonth,
Line 76:                 CVV2, Phone);
Line 77:         }
</td> </tr> </tbody> </table>
Source File: d:\HOME\ny600256\web\Store\CreditCardInput.ascx.cs    Line: 75

Stack Trace:

<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td>
[CryptographicException: Key not valid for use in specified state.
]
   System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) +425
   Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ProtectedKey.Unprotect() +15
   Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricCryptographer.Encrypt(Byte[] plaintext) +53
   Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider.Encrypt(Byte[] plaintext) +187
   Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.EncryptSymmetric(String symmetricInstance, Byte[] plaintext) +105
   Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.EncryptSymmetric(String symmetricInstance, String plaintext) +62
   DotShoppingCart.OpenSource.Core.CreditCard..ctor(String saveAs, Int32 creditCardTypeId, String cardNumber, String cardholderName, String expireYear, String expireMonth, String cvv2, String phone) in C:\Users\Himanshu\Desktop\PalisadeWine\DotShoppingCartOpenSourceV2\DotShoppingCartOpenSourceV2\Core\DBO\CreditCard.cs:71
   Controls_CreditCardInput.get_CreditCard() in d:\HOME\ny600256\web\Store\CreditCardInput.ascx.cs:75
   Controls_SelectCreditcardPaymentMethod.get_EnteredCreditCard() in d:\HOME\ny600256\web\Store\SelectCreditcardPaymentMethod.ascx.cs:38
   Store_SelectPaymentOption.get_CreditCard() in d:\HOME\ny600256\web\Store\SelectPaymentOption.ascx.cs:99
   Store_Checkout.Page_PreRender(Object sender, EventArgs e) in d:\HOME\ny600256\web\Store\Checkout.ascx.cs:86
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnPreRender(EventArgs e) +8684102
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
</td> </tr> </tbody> </table>
<hr width="100%" color="#c0c0c0" size="1" /> Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
<!-- [CryptographicException]: Key not valid for use in specified state. at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ProtectedKey.Unprotect() at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricCryptographer.Encrypt(Byte[] plaintext) at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider.Encrypt(Byte[] plaintext) at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.EncryptSymmetric(String symmetricInstance, Byte[] plaintext) at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.EncryptSymmetric(String symmetricInstance, String plaintext) at DotShoppingCart.OpenSource.Core.CreditCard..ctor(String saveAs, Int32 creditCardTypeId, String cardNumber, String cardholderName, String expireYear, String expireMonth, String cvv2, String phone) in C:\Users\Himanshu\Desktop\PalisadeWine\DotShoppingCartOpenSourceV2\DotShoppingCartOpenSourceV2\Core\DBO\CreditCard.cs:line 71 at Controls_CreditCardInput.get_CreditCard() in d:\HOME\ny600256\web\Store\CreditCardInput.ascx.cs:line 75 at Controls_SelectCreditcardPaymentMethod.get_EnteredCreditCard() in d:\HOME\ny600256\web\Store\SelectCreditcardPaymentMethod.ascx.cs:line 38 at Store_SelectPaymentOption.get_CreditCard() in d:\HOME\ny600256\web\Store\SelectPaymentOption.ascx.cs:line 99 at Store_Checkout.Page_PreRender(Object sender, EventArgs e) in d:\HOME\ny600256\web\Store\Checkout.ascx.cs:line 86 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.dynamic_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\bfa796fb\7315f536\App_Web_lt_pusrg.2.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
 
 
Please help me
 
Thanks in Advance
 
Himanshu
9/7/2009 1:48:02 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Paypal integration gives this Error:::: Key not valid for use in specified state.
Please recreate the key by following this. Restart app pool after you have done that.
DotShoppingCart Staff