Facing issue with attaching SSL certificate with .Net Framework 4.8

Anonymous
2024-02-13T20:01:18+00:00

Hello everyone,

We have a requirement to attach the SSL certificate while consuming SOAP services. We are getting an error as "Could not establish secure channel for SSL/TLS with authority 'url.com:portnumber'/". Inner Exception WebException: The request was aborted: Could not create SSL/TLS secure channel when we try to attach it using .net framework 4.8, However, we can make the connection with the same URL and same certificate using .Net core 6.0.

After further research, we found that the certificate is attached with .NetFramework 4.8 but it's not reaching the SOAP service. Is there any such limitation with .Net framework 4.8 or is there any different way of attaching the SSL certificate using .net framework 4.8? I am using the sample code below to attach the SSL cert,

System. Net. ServicePointManager.SecurityProtocol = System.Net. SecurityProtocolType. Tls12;

InqSvc_v1_0Client serviceClient = new InqSvc_v1_0Client("SOAPURL");

serviceClient.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName. Root, X509FindType.FindBySerialNumber, "SSL_CertSerialNumber");

res.InqRs = serviceClient.Inq(ss);

Any help will be greatly appreciated!

Windows for business Windows Client for IT Pros Networking Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-02-14T06:19:08+00:00

    Hello,

    Thank you for posting in Microsoft Community forum.

    Based on the description, I understand your question is related to .NET

    Since there are no engineers dedicated to .NET in this forum. In order to be able to get a quick and effective handling of your issue, I recommend that you repost your question in the Q&A forum, where there will be a dedicated engineer to give you a professional and effective reply.

    Here is the link for Q&A forum.
    Questions - Microsoft Q&A

    Click the "Ask a Question" button in the upper right corner to post your question and select "ASP.NET" tag.

    Thank you for your understanding and support.  If you have any question or concern, please feel free to let us know.

    Have a nice day.

    Best Regards,

    Hania Lian

    0 comments No comments