Azure上的Cyber​​Source [英] CyberSource on Azure

查看:71
本文介绍了Azure上的Cyber​​Source的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用Cyber​​Source服务进行请求,您必须在请求中附加.p12证书.

To do a request with CyberSource service you have to append .p12 certificate in request.

经典的附加方式(Cyber​​Source SDK):

Classic way of appending(CyberSource SDK):

    req.ClientCertificates.Add(new X509Certificate2(@"D:\cert\cert.p12", "password1"));

这在本地或专用主机上完美运行.

This works perfectly on local or dedicated hosting.

问题是我们需要在Azure上附加.p12证书,这在经典方式中是不可能的.

The issue is we need to append .p12 certificate on Azure, which is impossible in classic way.

我尝试将其放入wwwroot/App_Data并加载,但此后一直无法正常工作,我们得到的服务器错误是:

I've tried to put it in wwwroot/App_Data and load, but it doesn't work since, error from server we get is:

502-Web服务器在充当服务器时收到无效响应网关或代理服务器.您所在的页面有问题寻找,并且无法显示.当Web服务器(同时充当网关或代理)与上游内容服务器联系,它收到了来自内容服务器的无效响应.

502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

我在这里阅读了如何在Azure上使用cert(将p12更改为pfx并上传到Azure): https://azure.microsoft.com/zh-CN/blog/using-certificates-in-azure-websites-applications/

I've read here, how to use cert on azure(changed p12 to pfx and uploaded to Azure): https://azure.microsoft.com/en-gb/blog/using-certificates-in-azure-websites-applications/

但是我不确定,这是正确的方法.

But I am not sure, this is correct way.

推荐答案

我已通过将证书上传到Azure并将其用作指纹解决了此问题.您必须在web.config中使用指纹才能在网站上使用它.

I've resolved this by uploading certificate to Azure, and use it as a thumbprint. You have to use thumbprint in web.config to have it available on the website.

阅读: https://azure.microsoft.com/zh-CN/blog/using-certificates-in-azure-websites-applications/

这篇关于Azure上的Cyber​​Source的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆