Posted on: 1/11/2014 6:53:11 PM | Views : 767

Consider this code which is just an example of the problem so please don't comment on why I wouldn't want to do this. The code is simplified for the reader's benefit.
In an APS.NET Form partial postback method I have this:
Dim a As Boolean = test.Result
The call is to this async function:
Private Async Function test() As Task(Of Boolean)     Await Task.Delay(1000) 'simulates a call to an async function     Return True End Function
Since I am waiting for the Result (test.Result) on the returned Task this is now a synchronous call. This works fine as expected. 
The problem occurs when I add <httpRuntime targetFramework="4.5.1" /> to my web.config. After this change the page hangs and times out at the Await call. The function never returns. This holds true if I substitute the async call with any other one.
How can I get it to work as it did before the targetFramework a ...

Go to the complete details ...