.netCART 信用卡解密 - IIS 7 应用程序池和解密问题
我有一个使用 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不知道您的具体问题出在哪里,但该代码片段相当于:
解释更改:
.Item
部分,因为它是 DataRow 的索引器.ToString()
,如果是其他类型或 DbNulls.Trim()
方法,而不是 VBTrim()
函数。Trim()
和其他旧的字符串函数的存在只是为了向后兼容。 您最好习惯附加到字符串类型的方法。Don't know where your specific problem is, but that code snippet is equivalent to this:
To explain the changes:
.Item
part because it's an indexer for DataRow.ToString()
, in case of other types or DbNulls.Trim()
method rather than the VBTrim()
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.这个问题的最终结果是我使用 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.
检查 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?