简体   繁体   English

更新 .NET Web 服务以使用 TLS 1.2

[英]Update .NET web service to use TLS 1.2

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用 TLS 1.2 从我的 .NET Web 服务连接到另一个将强制使用 TLS 1.2 的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我发现一个资源说 .NET 4.6 默认使用 TLS 1.2,所以这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我更新了服务器上的 .NET 框架并重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在 IIS 中,我尝试使用 .NET 4.6 创建一个应用程序池,但 4.0 是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后我发现一些东西说它仍然会说 4.0,因为 4.6 是对 .NET 4.0 的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.然而,在我因无关原因得到的错误页面上,它说Microsoft .NET Framework Version:4.0.30319所以我似乎没有成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池使用 .NET 4.6 或更一般地如何启用 TLS 1.2 的任何指示?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2.我需要使用TLS 1.2从我的.NET Web服务连接到另一个将强制使用TLS 1.2的服务。 I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest solution.我找到了一个资源,该资源说.NET 4.6默认使用TLS 1.2,这听起来像是最简单的解决方案。 I updated the .NET framework on the server and restarted.我在服务器上更新了.NET框架,然后重新启动。 In IIS I tried to make an application pool using .NET 4.6 but 4.0 was the only option.在IIS中,我尝试使用.NET 4.6创建应用程序池,但4.0是唯一的选择。 Then I found something that said it would still say 4.0 because 4.6 is an "in place" update to .NET 4.0.然后,我发现某些内容仍然表示4.0,因为4.6是对.NET 4.0的“就地”更新。 So I thought maybe I was done.所以我想也许我已经完成了。 However on an error page that I got for unrelated reasons, it said Microsoft .NET Framework Version:4.0.30319 so it seems I have not successfully upgraded.但是,在由于不相关原因而导致的错误页面上,它显示为Microsoft .NET Framework Version:4.0.30319因此看来我尚未成功升级。 Any pointers on how to make sure my application pool is using .NET 4.6, or more generally how to enable TLS 1.2?关于如何确保我的应用程序池正在使用.NET 4.6的任何指针,或更笼统地说,如何启用TLS 1.2?

I'm wanting to use the code provided by Etienne Faucher.我想使用 Etienne Faucher 提供的代码。

However, how would I do this for a .Net console app, not an IIS/web app?但是,我将如何为 .Net 控制台应用程序而不是 IIS/Web 应用程序执行此操作?

<system.web>
    <compilation targetFramework="4.6"/> <!-- Changed framework 4.0 to 4.6 -->

    <!--Added this httpRuntime -->
    <httpRuntime targetFramework="4.6" />

    <authentication mode="Windows"/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM