ASP.NET HttpContext in async/await patterns using the Task Parallel Library – Part 3

The SynchronizationContext (SC) is a vital component for the ASP.NET request lifecycle and it is strictly coupled to the HttpContext. In the previous posts we saw how running asynchronous operations by using specific TPL patterns might lead to losing the SynchronizationContext and, thus, reference to the HttpContext. Such a behavior can impact applications in several…


ASP.NET HttpContext in async/await patterns using the Task Parallel Library – Part 1

Hopefully brief but yet needed introduction For a long time, when ASP and ASP.NET WebForms were the latest trend, web developers had to rely mainly on synchronous programming. After all, server computing can count on multithreading and it’s free from UI thread freezes. While users don’t normally accept a client application freezing the UI for…


Error “431 Failed to setup secure session” when connecting to a FTP Server with multiple FTP sites

Summary for lazy readers Let’s consider this scenario: We are using FTPs (FTP over SSL) to connect to a FTP site hosted on a Windows Server 2008 or later We have multiple FTP sites using SSL and we are using the virtual hostname feature FTP clients suddenly report connection error: “431 Failed to setup secure…


Putting it all together – CORS tutorial

Hosting the two sites on IIS and understanding the request flow and needed configuration to allow the entire application work correctly is what we will focus on in this article. This far, in this tutorial we have gone through creating the front-end website using Razor Pages and the back-end HTTP web-service using WebAPI, as well…


Building the ASP.net Core WebAPI backend – CORS tutorial

With the front end site complete, we can shift focus to building the WebAPI backend that will be powering the Echo Text service. Just as for the front-end site, In Visual Studio 2017, you can choose to create a new Project, and select the ‘Web’ category. Give the project a name and then select the…


Building the ASP.net Core Razor Pages site – CORS tutorial

In this part of the tutorial on CORS and ASP.net Core, we will create the front end application. Using Visual Studio 2017, I have selected to create a new Project. Inside the New Project dialog box, select the Web category, and then select the ASP.net Core Web Application template as show below: In the next…


Troubleshooting TLS / SSL communication problems for ASP.NET applications making HTTP Web Request or WCF queries to SSL endpoints – Scenario 3

In our first and second posts about troubleshooting the TLS / SSL problems, we worked to fix a “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel” error message. We made some basic tests, such as a “browser test” and found that the certificate used was not valid and then…

2

Troubleshooting TLS / SSL communication problems for ASP.NET applications making HTTP Web Request or WCF queries to SSL endpoints – Scenario 2

This is the second part of our series of articles about troubleshooting TLS / SSL communications problems when you make Http Web Request or WCF queries from your ASP.NET applications to SSL endpoints. In our first scenario, we troubleshooted a “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel” error message. We…

0