This is thread deadlock issue. To avoid this issue, you should use ConfigureAwait(false) to make the runtime continue in a different thread.
await Task.WhenAll(aAsync, bAsync).ConfigureAwait(false);
The .NET Framework and ASP.NET help you create web applications and services for Windows.
await Task.WhenAll(aAsync, bAsync).ConfigureAwait(false);
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
<script>
//Json string
var customer = '{"Name":"John","City":"NJ"}';
var customers = '[{"Name":"John","City":"NJ"},{"Name":"Miller","City":"PA"}]';
//Converting Json to Javascript Object
var Customer = JSON.parse(customer);
var Customers = JSON.parse(customers);
//Result
alert(Customer.Name);
alert(Customers[1].Name);
</script>
public partial class Default : System.Web.UI.Page
{
List<contact> Contacts;
protected void Page_Load(object sender, EventArgs e)
{
Do().Wait();
foreach (var item in Contacts)
{
Response.Write(item.LastName + ",");
}
}
async Task Do()
{
//get credential values
string consumerkey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
string consumersecret = "XXXXXXXXXXXXXXXXX";
string username = "XXXXXXXXXXX";
string password = "mypasswordXXXXXXXXXX";
//create auth client to retrieve token
var auth = new AuthenticationClient();
//get back URL and token
await auth.UsernamePasswordAsync(consumerkey,
consumersecret, username, password);
var instanceUrl = auth.InstanceUrl;
var accessToken = auth.AccessToken;
var apiVersion = auth.ApiVersion;
var client = new ForceClient(instanceUrl, accessToken, apiVersion);
var contacts = await
client.QueryAsync<contact>("SELECT Id, LastName From Contact");
Contacts = contacts.records;
}
public class Contact
{
public string Id { get; set; }
public string LastName { get; set; }
}
}
public interface IEnumerable
{
IEnumerator GetEnumerator();
}
public interface IEnumerator
{
object Current { get; }
bool MoveNext();
void Reset();
}
=JOIN(LookupSet(Fields!ID.Value, Fields!ID.Value, Fields!Name.Value, "Sections"),",")
LookupSet(source_expression, destination_expression, result_expression, dataset)
I had more than 4000 items in searchable dropdownlist. I have used react-select but it was very slow. finally I found complete solution to ...