Azure上的Cyber​​Source

编程入门 行业动态 更新时间:2024-10-25 11:20:25
本文介绍了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): azure.microsoft/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): azure.microsoft/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.

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

更多推荐

Azure上的Cyber​​Source

本文发布于:2023-11-25 02:36:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627987.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Azure   Cyber   Source

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!