.netCART 信用卡解密 - IIS 7 应用程序池和解密问题

发布于 2024-07-20 04:05:25 字数 554 浏览 8 评论 0原文

我有一个使用 .netCART 的网站。 它在 Windows Server 2003 和 .NET 2.0 的生产中运行良好。 在新服务器(Windows Server 2008)上,除了商店管理中的信用卡解密之外,一切正常。 没有发送错误,没有抛出异常,只是将加密的字符串输出到屏幕,而不是解密的信用卡号码。

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

有没有人有过 .netCART 的经验,或者以前见过这个问题?

编辑: 经过昨天的大量调查,问题似乎与应用程序池(在 .NET 2.0 上以经典管道模式运行)和解密有关。 谁能告诉我与默认应用程序池绑定的有助于处理解密的进程或服务是什么?

I've got a site using .netCART. It's running fine in production with Windows Server 2003 and .NET 2.0. On the new server (Windows Server 2008) everything is working except for credit card decryption in the store admin. No errors are being sent, no exceptions thrown, just the encrypted string being output to the screen instead of a 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 experience with .netCART, or seen this issue before?

EDIT:
After much investigating yesterday, it seems as though the problem is tied to the App Pool (which is running in classic pipeline mode on .NET 2.0), and Decryption. Can anyone tell me what the processes or services are that are tied to the default app pool which help handle decryption?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

这样的小城市 2024-07-27 04:05:25

不知道您的具体问题出在哪里,但该代码片段相当于:

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

解释更改:

  • 您可以跳过 .Item 部分,因为它是 DataRow 的索引器
  • 但您应该调用 .ToString(),如果是其他类型或 DbNulls
  • ,则使用字符串类型的 .Trim() 方法,而不是 VB Trim() 函数。 Trim() 和其他旧的字符串函数的存在只是为了向后兼容。 您最好习惯附加到字符串类型的方法。
  • 在 .Net 中,在同一行中声明一个变量并为其赋值并没有什么大不了的
  • 。在 .Net 中,微软的风格指南特别建议不要在变量名称上使用任何匈牙利表示法类型。

Don't know where your specific problem is, but that code snippet is equivalent to this:

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

To explain the changes:

  • You can skip the .Item part because it's an indexer for DataRow
  • But you should call .ToString(), in case of other types or DbNulls
  • Then use the string type's .Trim() method rather than the VB Trim() function. Trim() and other old string functions exist solely for backwards compatibility. You're better off becoming accustom to the methods attached to the string type.
  • In .Net, it's no big deal to declare a variable and assign to it on the same line
  • And in .Net, Microsoft's style guidelines specifically recommend against any hungarian-notation type warts on variable names.
月亮是我掰弯的 2024-07-27 04:05:25

这个问题的最终结果是我使用 Reflector 来获取方法,手动提供密钥来执行解密,因为上面显示的解密方法只是提供了对获取密钥的方法的调用。

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

够钟 2024-07-27 04:05:25

检查 web.config 中的 machinekey 元素。 信用卡的加密密钥是否有可能与您尝试解密的密钥不同?

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文