I may have stumbled onto a strange bug thats within either TweetSharp or Hammock. When trying to get an authorization token from Twitter via the normal routine of:
TwitterService service = new TwitterService(API_KEY,API_SECRET);
OAuthRequestToken request = service.GetRequestToken(GetCallBackUrl());
I've noticed that if the callback url contains an IP address instead of a machine name (localhost/SERVER1 etc), the page takes forever to load then an ArgumentNullException is thrown.
System.ArgumentNullException: Value cannot be null.
Parameter name: query at System.Compat.Web.HttpUtility.ParseQueryString(String query, Encoding encoding)
in f:\src\hammock\src\net40\Hammock.ClientProfile\Mono\HttpUtility.cs:line 1220 at
System.Compat.Web.HttpUtility.ParseQueryString(String query)
in f:\src\hammock\src\net40\Hammock.ClientProfile\Mono\HttpUtility.cs:line 1214
at TweetSharp.TwitterService.GetRequestToken(String callback)
in f:\src\tweetsharp\src\TweetSharp\TwitterService.OAuth.cs:line 173
at TwitterForm.SetAuthUrl()
at TwitterForm.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Once I switch back to the PC name, all seems fine, sometimes. On most clients, switching to the Name works, on some however, it doesnt and keeps throwing the above error. I suspect the people for whom changing to the PC name doesn't work, may be the fact that they're using a proxy server. I'll keep troubleshooting.
For now I just wanted to know if anyone has a possible work-around or solution to this?