News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
.Net framework 4.5 await authorize hangs
Tags: authentication
Jun 5, 2019 at 12:07pm   •   3 replies  •  0 likes
sravani kandarpa

I am running below code from my console application and it works perfectly and I can fetch data

static async Task GetCallLogs() {
 var rc = new RestClient(RINGCENTRAL_CLIENT_ID, RINGCENTRAL_CLIENT_SECRET, RINGCENTRAL_PRODUCTION_URL); await rc.Authorize("username", "ext", "password"); 
// making api calls
}


But when I am doing the same thing from the .NET framework controller, system hangs at await

public void  UpdateRingCentral()
   {
             var t= new GetCallLogs();
             t.Wait();
   }
public async Task GetCallLogs() { 
var rc = new RestClient(RINGCENTRAL_CLIENT_ID, RINGCENTRAL_CLIENT_SECRET, RINGCENTRAL_PRODUCTION_URL); await rc.Authorize("username", "ext", "password"); 
// making api calls
}


Any advice or suggestions for fixing this issue.

3 Answers
answered on Jun 29, 2019 at 7:25am  

There is fee more docs available on these type of issue here.


 0
answered on Jun 23, 2019 at 12:00am  

There is fee more docs available on these type of issue here.


 0
answered on Jun 22, 2019 at 2:39pm  

This is a very common feature of .net platform which arise deadlock condition during making the actual REST call and parsing it as JSON .

There are many ways you can prevent this mentioned here .

Also refer here to get your answer

Another link you should read:

https://devblogs.microsoft.com/pfxteam/await-and-ui-and-deadlocks-oh-my/


 0
answered on Jun 5, 2019 at 1:34pm  

 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us