an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 3/19/2010 12:00:27 PM By Bahram. 3 replies.
8/19/2009 9:09:25 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Padding error

Hi Luke,

I have this error, every day, stops OrderPipeLine . There is nothing in config file.

 

Type : System.Security.Cryptography.CryptographicException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Padding is invalid and cannot be removed.

 

Bahram

8/19/2009 9:22:48 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Padding error
Read DotshoppingcartMaster.key in the online help.
DotShoppingCart Staff
3/19/2010 9:37:12 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: Padding error
Do I need to update OrderPipeline Two Config files too?
 
After Generating a master Key , now I get tens of error message instead of one. when I put it in all config files: web and orderpipeline
 
    <symmetricCryptoProviders>
      <add algorithmType="System.Security.Cryptography.RijndaelManaged, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        protectedKeyFilename="D:\Dbkey\DotshoppingcartMaste.key" protectedKeyProtectionScope="LocalMachine"
        type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="RijndaelManaged" />
    </symmetricCryptoProviders>
 
 
I set  PublicKeyToken=null and  I juest see the original error and OrderPipelIne  crashes.
 
HandlingInstanceID: cb3653e8-5249-40a2-8b84-655079d5e6df
An exception of type 'System.Security.Cryptography.CryptographicException' occurred and was caught.
---------------------------------------------------------------------------------------------------
03/19/2010 11:48:50
Type : System.Security.Cryptography.CryptographicException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Padding is invalid and cannot be removed.
Source : mscorlib
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 DecryptData(Byte[], Int32, Int32, Byte[] ByRef, Int32, System.Security.Cryptography.PaddingMode, Boolean)
Stack Trace :    at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

 
How can I run a Test Site without problem.
3/19/2010 12:00:27 PM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: Padding error
What is the second Public Token Key. It seems Entlib utility generates the same old token key.
 
Please provide steps to avoid this error. OrderPipeLIne crashes after the error and do not completes its job.