The most recent release of PockeTwit has an annoying bug that causes the first request upon startup to fail with a communication error. I finally tracked down the code to one line within our WebRequest factory:
public static HttpWebRequest CreateHttpRequest(Uri uri)
var request = (HttpWebRequest)WebRequest.Create(uri);
request.AllowAutoRedirect = true;
var proxy = new WebProxy(ClientSettings.ProxyServer, ClientSettings.ProxyPort);
proxy.BypassProxyOnLocal = true;
proxy.Credentials = CredentialCache.DefaultCredentials;
request.Proxy = proxy;
For some reason, the “request.AllowAutoRedirect = true” is causing the first requests to fail with a “401: Unauthorized” from twitter! No idea why that would happen, my suspicion is another little “gotcha” from CF.NET 2.0.
Edit: It looks like I jumped the gun and did just what everyone else does—blame Twitter’s issue on the client. I’ve had a lot of reports that other twitter clients are experiencing the same issue.