johnytables, Author at .NET Development & News johnytables, Author at .NET Development & News Skip to content Primary Menu Twitter RSS .NET Development & News Home Contact Search for: Recent Posts .NET 4.5 and TLS 1.2 Azure Web App with Let’s Encrypt Certificate – Powershell Automation Polly, a resilience and transient-fault-handling library MemAnalyzer v2.5 Released Publishing dotnet core to IIS does not copy project xml documentation Archives March 2018 January 2018 August 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 May 2013 Categories .NET C# Cloud DevOps eBooks Fun Javascript Mobile Security SQL Systems Uncategorized Web Meta Log in Entries feed Comments feed WordPress.org Skip to content .NET Development & News a bit of this and that Author: johnytables .NET, DevOps, Security, Systems, Web .NET 4.5 and TLS 1.2 Posted on March 6, 2018 by johnytables We were having an issue regarding WebRequests between Identity Server 3 (Web App .NET 4.5) and a new ADFS 4 (Web App) running on Windows Server 2016. The IdentityServer 3 request failed with the semi-vague error: Unable to get document from: https://host.com/adfs/.well-known/openid-configuration —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) — End of inner exception stack trace — at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) … The error is a bit vague but with the CallStack we can figure out that there is a problem on TlsStream.EndWrite and from there we figured out that it was a failure in TLS Handshake. What happens is that Applications (Web, Desktop, etc..) that are previous to .NET 4.6 when web requests are made (WebRequests, HttpClient, etc..) they have by default a maximum of TLS 1.1 as possible ciphers and the HTTPS endpoint that we were calling only supported TLS >= 1.2 This Stack Overflow thread shows multiple ways of using the new 1.2 TLS version with .NET 4.xhttps://stackoverflow.com/questions/4137106/are-there-net-implementation-of-tls-1-2 In our case we decided to switch the Web App compilation to 4.6 and all compiled and the web requests to ADFS started working. You can use SSLLabs to test HTTPS endpoints including checking which ciphers are available for clients to connect. For the IT guys, that want to have your IIS servers hardened (without legacy ssl and tls protocols) there is a very cool tool that is IISCrypto “IIS Crypto is a free tool that gives administrators the ability to enable or disable protocols, ciphers, hashes and key exchange algorithms on Windows Server 2008, 2012 and 2016. It also lets you reorder SSL/TLS cipher suites offered by IIS, implement best practices with a single click, create custom templates and test your website.” 0 Uncategorized Azure Web App with Let’s Encrypt Certificate – Powershell Automation Posted on January 26, 2018 by johnytables Azure Web App with Let’s Encrypt Certificate – Powershell Automation 0 .NET Polly, a resilience and transient-fault-handling library Posted on August 18, 2017 by johnytables Remember don’t over engineer, but if the request comes to place be sure to checkout this nifty resilience and transient-fault-handling library. https://github.com/App-vNext/Polly 0 .NET, DevOps MemAnalyzer v2.5 Released Posted on August 18, 2017 by johnytables Your toolbox just has got a little bigger, check out this command line MemoryProfiler MemAnalyzer v2.5 Released 0 Uncategorized Publishing dotnet core to IIS does not copy project xml documentation Posted on August 10, 2017 by johnytables This is a reported bug and is going to be fixed, but meanwhile there is a workaround: https://github.com/dotnet/sdk/issues/795 0 .NET, Web Troubleshooting ASP.NETCore Startup in IIS Posted on August 10, 2017 August 10, 2017 by johnytables If you run into a generic error message while starting your ASP.NET Core application after publishing to IIS, check out this blog post How to troubleshoot: “An error occurred while starting the application” in ASP.NET Core on IIS 0 .NET, Web Modular ASP.NET Apps Posted on June 30, 2017 by johnytables Check out this interesting modular Application Framework for ASP.NET MVC Apps https://channel9.msdn.com/Shows/On-NET/Sbastien-Ros-Modular-ASPNET-apps 0 Javascript Javascript optimization patterns (Part 1) Posted on June 23, 2017 by johnytables https://dzone.com/articles/javascript-optimization-patterns-part-1 0 Uncategorized Four ways to dispose IDisposable in ASPNet Core Posted on June 21, 2017 by johnytables https://andrewlock.net/four-ways-to-dispose-idisposables-in-asp-net-core/ 0 Uncategorized Using IActionConstraints in ASPNet Core MVC Posted on June 21, 2017 by johnytables https://www.strathweb.com/2017/06/using-iactionconstraints-in-asp-net-core-mvc/ 0 Posts navigation Older posts .NET Development & News Proudly powered by WordPress Theme: Satellite.