c# - Webpage sometimes cannot connect to other url with SSL -


we have application (webapi, let's name "x") working on iis on windows server 2012 r2. "x" cannot connect other independent api's on web. got error:

the underlying connection closed: not establish trust relationship ssl/tls secure channel.

the remote certificate invalid according validation procedure.

i've done testing , @ same time "x" cannot download https://google.com (using webclient class) can browse web browser on current server.

also tried ignore server certificate errors whole application (code below) didn't too.

protected void application_start() {         servicepointmanager.servercertificatevalidationcallback +=          (sender, cert, chain, sslpolicyerrors) => true; } 

my clients have no problem connecting "x". when error occures on 1 server able connect (https://google.com example) on other servers different instance of "x".

what wrong?

it sounds iis web application running under user context doesn't have access certificates on machine. however, browser running under different user context have access. explains test results.

if user have access certificates, possibly need download certificates independent api's. see this: http://brainof-dave.blogspot.com.au/2008/08/remote-certificate-is-invalid-according.html

check out these resources too: https://blogs.msdn.microsoft.com/saurabh_singh/2009/07/02/required-permissions-when-calling-a-web-service-using-client-certificate-for-authentication-in-an-asp-net-web-application/

https://technet.microsoft.com/en-us/library/cc772237(v=ws.10).aspx


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -