Error in mapping the SSL cert - System.Security.Cryptography.CryptographicException

Hi,

I am trying to consume a SOAP service with https endpoint using the SSL certificate. I have installed the certificate in my outsystems environment and when I try to map it to the service and publish the module, I am getting below mentioned error.

The system cannot find the path specified.

System.Security.Cryptography.CryptographicException: The system cannot find the path specified.


   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)

   at System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)

   at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)

   at OutSystems.HubEdition.DeployService.Deploy.CheckCertificates(String espaceName)

   at OutSystems.HubEdition.DeployService.Deploy.DeployEspace(String espaceName, String espaceKey, Int32 espaceVersionId, Boolean fromSS, Boolean developmentMode, String userName, Boolean partial, Boolean forceRedeploy, Boolean fromCompilerService, String uniqueId, IEnumerable`1 onDeployInvokeUrls)

CompModule : Broadcast Message


Did anyone face this similar issue & any help to resolve this ?

Thanks,

Karthik

Hello Karthik Jeyaraman


Have you specified the full path to the certificate ? 

besides that you could check the following ( if you run OutSystems on premise):

  1. Go to IIS Manager
  2. Go to the application pool instance
  3. Click advanced settings
  4. Under Process model, set Load User Profile to true

According to this source: https://stackoverflow.com/questions/17840825/cryptographicexception-was-unhandled-system-cannot-find-the-specified-file

and https://social.msdn.microsoft.com/Forums/vstudio/en-US/7ea48fd0-8d6b-43ed-b272-1a0249ae490f/systemsecuritycryptographycryptographicexception-the-system-cannot-find-the-file-specified?forum=clr


Alternatively it could also be related to the certificate structure as detailed here: https://social.msdn.microsoft.com/Forums/en-US/4dfaa7af-999d-4c56-a8b9-4b7b8fb1665a/trouble-getting-external-webservice-to-work?forum=WindowsAzureAD


With kind regards,


Michael de Ruijter