Skip to main content
Question

Getting WaitingForActivation while using c# sdk

  • November 20, 2017
  • 4 replies
  • 6579 views

Hi,


I am using c# sdk for my server application.i have already done authorization using appKey and appSecret and user name password.


now when i am going call method to get the messages (Message List) from c# using below code.its giving me following response.


Request :


var extension = rc.Restapi().Account().Extension();


var response = await extension.MessageStore().List();


var messages = response.records;


in response i am getting below :


Id = 1487

Status = WaitingForActivation

Result = null


can you please help me solve this problem

4 replies

  • Community Manager
  • 444 replies
  • November 21, 2017
The C# SDK is async.

  var response = await extension.MessageStore().List();

Do not omit the await keyword.

 Or you can try the following:

var response = extension.MessageStore().List().Result;

Reference: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/async

  • Author
  • Known Participant
  • 10 replies
  • November 21, 2017
Thanks Tyler for your reply. but when i am using above mention solutions. it will not giving me any response just stuck over there.

Nothing is happens when i use await keyword or writing .Result as above. it will simply stuck and not able to get any response from it



  • Community Manager
  • 444 replies
  • November 21, 2017
It's hard to get C# async correct. And it is often "stuck". Generally speaking it is a C# programming issue: https://www.google.com.hk/search?q=c%23+async+stuck&oq=c%23+async+stuck&aqs=chrome..69i57j69...

  • Community Manager
  • 444 replies
  • November 21, 2017
According to this: https://stackoverflow.com/a/14527164/862862

One possible solution is to use await everywhere. Don't mixup await and .Result

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings