2

My application is a self-hosted .NET application. It's .NET version is 4.5.2. I wanted to support TLS 1.2 in my application. Is there any way to do it without upgrading the .NET version?

Sivaprasad derangula
  • 1,169
  • 4
  • 12
  • 29
  • Normally it should work (so maybe you can explore other clues to determine your problem), I had a similar issue but with TLS1.0, you can check my question here : https://stackoverflow.com/questions/47769840/invoking-a-soap-web-service-stopped-working-after-windows-update – Fourat Aug 24 '18 at 07:28
  • Checkout [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls) on the subject and [this](https://stackoverflow.com/questions/28286086/default-securityprotocol-in-net-4-5) answer. – fredrik Aug 24 '18 at 07:29
  • If you don't want to update the .NET Framework version of your application, you can specify the integral value of the `SecurityProtocolType` enum. `ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;`. As long as the server has TLS1.2 support. – ColinM Aug 24 '18 at 08:56
  • Where exactly we need to update that? Its self hosted app, there will be no global.asax. – Sivaprasad derangula Aug 24 '18 at 10:56
  • The best place is what ever the entry point is, so something like `Main` in the Program.cs file for a console app. – ColinM Aug 31 '18 at 12:29

0 Answers0