CredentialsCreator.GetAuthorizationURLForCallback timeout under 0.9.7.0

Apr 27, 2015 at 7:22 PM
Hi Linvi,
Calling CredentialsCreator.GetAuthorizationURLForCallback consistently gives a timeout under 0.9.7.0:
Tweetinvi.Core.Exceptions.TwitterTimeoutException: https://api.twitter.com/oauth/request_token web request timed out.

The same request on the same machine works on 0.9.6.1
Cheers,
Josh
Coordinator
Apr 28, 2015 at 9:51 AM
Hi Josh,

And all the other web request are working?
Can it be reproduced with the code that you shared in previous conversation?

Linvi
Apr 28, 2015 at 10:03 AM
Hi Linvi,
This is in a ASP.NET web application & I believe it is the only place that makes a request to Twitter, everything after authentication gets handled by separate applications.
I haven't tried to reproduce it in a console app, so it may be ASP.NET related.
Cheers,
Josh
Apr 28, 2015 at 10:50 AM
Hi Linvi,
I've just checked this in a console application with
ITemporaryCredentials tempCredentials = CredentialsCreator.GenerateApplicationCredentials(CONSUMER_KEY, CONSUMER_SECRET);
string authUrl = CredentialsCreator.GetAuthorizationURLForCallback(tempCredentials, "http://localhost/test");
Console.WriteLine(authUrl);
And this works, so it's either ASP.NET or something else in that project.
I'll try and reproduce it in some simple blank ASP.NET application this afternoon.
Cheers,
Josh
Coordinator
Apr 28, 2015 at 11:40 AM
Yes, I have fixed the issue. It is a bug with the Async Framework and ASP.NET.
For some reason in ASP.NET calling Task.Result from an HttpClient WebRequest freezes the request and therefore all the WebRequests were getting a Timeout Exception.

http://stackoverflow.com/questions/10343632/httpclient-getasync-never-returns-when-using-await-async

Cheers,
Linvi
Marked as answer by JKeegan on 4/28/2015 at 3:54 AM
Apr 28, 2015 at 11:54 AM
Thanks!
Will there be a release on NuGet for this today, or should I build from src?
Cheers,
Josh
Coordinator
Apr 28, 2015 at 12:13 PM
There will be a build today!
Coordinator
Apr 28, 2015 at 12:50 PM
Done!