Exception on EndSession

Mar 28, 2012 at 6:50 AM
Edited Mar 28, 2012 at 7:19 AM

Demo Throws an exception during EndSesion option..

File: TwitterExecute.cs

Line:  1095

public string ExecuteTwitter<T>(string url, IDictionary<string, string> postData, IRequestProcessor<T> reqProc)

url: https://api.twitter.com/1/account/end_session.json

System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at LinqToTwitter.Utilities.AsyncGetResponse(HttpWebRequest req) in linqtotwitter-20e0c5f0c607\LinqToTwitterAg\OAuth\Utilities.cs:line 60
   at LinqToTwitter.TwitterExecute.ExecuteTwitter[T](String url, IDictionary`2 postData, IRequestProcessor`1 reqProc) in linqtotwitter-20e0c5f0c607\LinqToTwitterAg\LinqToTwitter\TwitterExecute.cs:line 1203}

It has a valid oauth consumer key and secret and access token and secret.

Coordinator
Mar 28, 2012 at 8:10 AM

A couple questions - did you start a session (i.e. perform authentication) before calling EndSession?  and Does this happen to you every time or just intermittently?  I'm interested to see if there's a new 401 scenario because I'm planning to write a 401 FAQ.

Thanks,

Joe

Mar 30, 2012 at 5:45 AM

Sorry, i didnt see the response and i didnt specified the enviroment, it was during the demo running, i chose the anonymous auth and then it appears the endsession and y pressed "y", i think the library should had a flag in the context that throw and specific exception in some cases like this one instead of just use the exception management in that function that is seems to be very generic in my opinion (i needed to debug in VS to see the exception throwed that is catched and throws this another one exception.)

Sorry if Im wrong, I could be wrong.

Mar 30, 2012 at 5:45 AM

Sorry, i didnt see the response and i didnt specified the enviroment, it was during the demo running, i chose the anonymous auth and then it appears the endsession and y pressed "y", i think the library should had a flag in the context that throw and specific exception in some cases like this one instead of just use the exception management in that function that is seems to be very generic in my opinion (i needed to debug in VS to see the exception throwed that is catched and throws this another one exception.)

Sorry if Im wrong, I could be wrong.

Mar 30, 2012 at 5:49 AM

Sorry, codeplex "Send me an email when someone posts a reply" has a bug, it causes to have 2 post fired to the server and this perform duplicated comment.

Coordinator
Mar 31, 2012 at 2:37 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Mar 31, 2012 at 2:39 AM

I made this an issue so I can take a closer look at it.

Thanks,

Joe