So I woke up on Saturday to this problem with my software. Having been out playing softball the night before and drinking until 1AM I wasn’t in any condition to troubleshoot and fix the problem. However, after a round of golf today and watching Kimi Raikkonen won the Hungarian GP, I was ready to fix the problem.
First, I thought it was something I’ve changed in the code last few days but that won’t be true as users with older version of the software also have the problem. Then I confirmed that it is a problem in my software by using the Mac version of ecto because it worked. Finally I relented and downloaded a copy of a competitor’s software (which shall remain nameless). That software worked so then it is my software.
I put a trace program on and discovered to my dismay that the .Net HTTP library sends out an extra HTTP header that it shouldn’t have (To the initiated, it is the Expect: 100-Continue). So I thought, “Ok, let’s just remove it from the HTTP Header in the code”. Silly me, setting HttpWebRequest.Expected = null does nothing!
But wait! Google came to rescue and I found this post about this stupid problem. Once I set the HttpWebRequest.ServicePoint.Expect100Continue = false, my software connects to TypePad once again!
Total time to fix a bug caused by Microsoft: ~2 hours.
Thanks alot, Mr. Gates. At least this is before my HDTV is delivered!