В роботі

Azure function that Calls external site and needs HTTPS with a Certificate

I am trying to call an external website from within a Azure Function Http Trigger.

I got this working in local mode with the Certificates installed on Windows Cert Store. I uploaded the Certificates to Azure Functions -> Platform Features on the SSL tab and also added WEBSITE_LOAD_CERTIFICATES to application settings whith the thumbprint of the Certificate. It looks like the Certificate is available for the Azure Function but I am not able to call the external HTTPS.

HttpClientHandler handler = new HttpClientHandler();

[login to view URL]("* HttpClientHandler ");

X509Certificate2 certificate =



if (certificate != null)


[login to view URL]($" Issuer: {[login to view URL]} "

+ $"SerialNumber: {[login to view URL]}");

[login to view URL](certificate);




[login to view URL]("Cant find Certificate");


HttpClient httpClient = new HttpClient(handler);

[login to view URL]("HttpClient");

HttpResponseMessage httpResponseMessage;



string jsonData = [login to view URL](data);

StringContent content = new StringContent(jsonData,

[login to view URL], "application/json");

[login to view URL](url);

[login to view URL](jsonData);

httpResponseMessage = await [login to view URL](url, content);


catch (Exception jsonException)


[login to view URL]([login to view URL]);



Now I test this in local mode and test to send data to: http://localhost:7071/api/SwishApp works fine. The call is done within the Azure http trigger function with the Correct Certificate.

So I publish and try the same but with the url to Azure.

This is the data I can get from the log:

2018-07-14T08:56:15.374 [Info]========================================

2018-07-14T08:56:15.374 [Info] C e r t i f i c a t e

2018-07-14T08:56:15.374 [Info] * ServicePointManager

2018-07-14T08:56:15.374 [Info] * HttpClientHandler

2018-07-14T08:56:15.374 [Info] Search for Cert


2018-07-14T08:56:15.390 [Info] Store Open

2018-07-14T08:56:15.390 [Info]

2018-07-14T08:56:15.390 [Info] StoreCertificates: 1

2018-07-14T08:56:15.390 [Info]

2018-07-14T08:56:15.390 [Info] Name: Issuer: CN=Test Swedbank Test,

SERIALNUMBER=xxxxx, O=Swedbank AB xxx

2018-07-14T08:56:15.390 [Info]

2018-07-14T08:56:15.390 [Info] HttpClient

2018-07-14T08:56:15.390 [Info] https://xxxxxxxx/api/v1/paymentrequests/

2018-07-14T08:56:15.390 [Info]


"callbackUrl":"[login to view URL]",





"message":"Payment Coffe"}

2018-07-14T08:56:15.531 [Info] An error occurred while sending the request.

2018-07-14T08:56:16.078 [Error] Function completed (Failure,


IMHO I get the Certificate but the problem is when sending at:

httpResponseMessage = await [login to view URL](url, content);

Навички: Azure, Програмування на С

Деталі: post external site, aspnet html form post external site, aspnet forms post external site, ajax post external site, form external site asp net, aspnet posting form external site, dating web site needs member profiles, function will ecommerce site perform, https certificate servlet xml, php frame external site bottom, send file https certificate vb6, read external site xml, firefox fehler site needs vertical, perl function calls, site needs flash

Про роботодавця:
( 94 відгуки(-ів) ) Västerås, Sweden

ID Проекту: #17359588

3 фрілансерів(-и) у середньому готові виконати цю роботу за $342


Hello, My name is Miguel Febres and you can locate my resume and certifications in the following links: [login to view URL] [login to view URL] In my 10+ years of e Більше

$250 USD за 2 дні(-в)
(4 відгуків(и))

I have five years of experience in c# development and two years of experience in Azure applications. I can complete your work on time. Please award me the project. Relevant Skills and Experience Worked on Azure logic Більше

$500 USD за 3 дні(-в)
(1 відгук)

I am a Microsoft engineer, I work on Azure websites, and Azure functions for my office work all day. This seems to be another issue faced doing my regular work :) It looks surprising that it is not working for you. I Більше

$277 USD за 2 дні(-в)
(0 відгуків(и))