.netCART Credit Card Decryption - Application Pool and IIS 7 Extension Issue

I have a site using . netCART . It works great on Windows Server 2003 and .NET 2.0. On the new server (Windows Server 2008) everything works except for the decryption of the credit card in the store admin. No errors are sent, no exceptions are thrown, and only the encrypted string is displayed instead of the decrypted credit card number.

Dim strCCEncrypt As String
strCCEncrypt = Trim(DataRow.Item("CreditCard"))
strCCEncrypt = tools.Decrypt(strCCEncrypt) 'tools is a .netCART utility

      

Has anyone had any experience with .netCART or seen this problem before?

EDIT: After a lot of research yesterday, it seems like the problem is with the application pool (which runs in classic pipeline mode on .NET 2.0) and Decryption. Can anyone tell me which processes or services are associated with the default application pool that help handle decryption?

0


a source to share


3 answers


The end result of this problem was that I used Reflector to get the method, provided the key manually to perform the decryption, as the above decryption method just provided a call to the method that took the key.



0


a source


Not sure where your specific problem is, but this piece of code is equivalent to this:

Dim CCEncrypt As String = tools.Decrypt(DataRow("CreditCard").ToString().Trim())

      



To explain the changes:

  • You can skip the part .Item

    because this is the index for the DataRow
  • But you must call .ToString()

    , in the case of other types or DbNulls
  • Then use the string method .Trim()

    , not the VB function Trim()

    . Trim()

    and other old string functions exist solely for backward compatibility. You'd better get used to string type related methods.
  • In .Net there is nothing to declare a variable and assign to it on the same line
  • And in .Net, Microsoft's style guides specifically recommend against any Hungarian type warts with variable names.
0


a source


Check the machinekey element in your web.config file. Is it possible that the credit cards were encrypted with a different key than you are trying to decrypt them?

0


a source







All Articles