I am implementing registration process that implements cybersource as payment gateway with ASP MVC web API.
In web.config we have to specify the keys and logs directory.
<add key="cybs.keysDirectory" value= "E:\CyberSource\Keys/" /> <add key="cybs.logDirectory" value= "E:\CyberSource\Logs/" />
This works fine when we deploy the API on IIS and work locally. But when we deploy the API to Azure and for the registration part (Subscribe) that use the CyberSource gateway we get the 502 bad request error from the request.
We tried relative paths as well but still the same error.
Issue: We believe that the API is not getting the .p12 file from the keys directory.
Question: Where to put the .p12 file or where to create the keys directory and what should we specify in web.config to make it work.
If you want to use the certificates in the Azure WebApp, please have a try to convert .p12 to .pfx /echatspin and install it in the WebApp. About how to upload and use certificates in Azure WebApp, please refer to this blog. I aslo find another similar SO thread /echatrandom
Adding an app setting named WEBSITE_LOAD_CERTIFICATES with its value set to the thumbprint of the certificate will make it accessible to your web application. You can have multiple comma-separated thumbprint values or can set this value to “ * “ (without quotes) in which case all your certificates will be loaded to your web applications personal certificate store.