Can anybody please point me to the right direction. I am not a .NET developer and it is frustrating to find out things in .NET are not straight forward. This is a web application. In my googling I find people say this works in a console app but not in a web app:
<WebMethod()>
Public Async Function Send1() As Threading.Tasks.Task(Of Boolean)
Dim client As HttpClient = New HttpClient()
' where url and data are predeclared
Dim response As HttpResponseMessage = Await client.PostAsync(url,data)
Console.WriteLine("This line never executes")
Return True
End Function
Tried a lot of stuff I found when googled. Like adding .ConfigureAwait(false), a lot of references pointing to an Stephen spending pages to explain it is deadlock issue, duh, yes it probably is, but what I am looking for is what would the right code be. Thank you.