This Week on C9: The Thanksgiving Episode

Very happy to see the Spec# release. Looking forward to giving it a run around this weekend.
I've often wondered how Microsoft measures the return on investment when it comes to things like Channel 9. Should the pointy nosed bean counters ever start pounding on Charles' and the rest of the 9er crew's doors demanding a blood sacrifice then I will happily get on a plane, come to the 'States and explain to them - with diagrams - why Channel 9 rocks and from my perspective represents the best outreach / programming community initiative I've experienced from Microsoft in 15 years of programming on Windows.
Hi Dan,
Thank you for helping out. I am using VS Express 2008. I added the SmartThread dll (v 1.0) and since I don't have (or want) an iTune library, I commented out its references. InnerTube seems to compile fine. I can launch it and it looks I can add feeds as needed,
but when I click on refresh feeds the apps stops working (I get the Windows message "InnerTube has stopped working") and it exits. I could probably try debugging it, but my debugging skills are very basics.
Edit: i tried debugging and the code stops on file InnerTubeService.cs at line 202:
XmlTextReader xr = new XmlTextReader(wc.OpenRead(youTubeUrl));
The debugger says:
System.Net.WebException was unhandled by user code
Message="The remote server returned an error: (400) Bad Request."
Source="System"
StackTrace:
at System.Net.WebClient.OpenRead(Uri address)
at SharedUtilities.InnerTubeService.ConvertYouTubeXmlToObjects(Uri youTubeUrl, Setting setting) in C:\Users\giovanni\Documents\Visual Studio 2008\Projects\InnerTube-7380\CSharpBookVersion\InnerTube\SharedUtilities\InnerTubeService.cs:line 202
at SharedUtilities.InnerTubeFeedWorker.UpdateFeeds(Object state) in C:\Users\giovanni\Documents\Visual Studio 2008\Projects\InnerTube-7380\CSharpBookVersion\InnerTube\SharedUtilities\InnerTubeFeedWorker.cs:line 302
at Amib.Threading.Internal.WorkItem.ExecuteWorkItem()
InnerException:
Thanks for your help
Thanks giovanni, this is very helpful, it looks like the URL for the feeds that are added aren't XML files, hence the bad request. I suspect it's a bug where, if your using a username to add a feed, YouTube needs to encode that username in a particular way
to display it correctly.
To help understand the issue, can you copy and paste your InnerTube.xml file which you can find at
$username$\Videos\InnerTube\InnerTube.xml (on XP at Documents and Settings\$username$\Videos\InnerTube\InnerTube.xml) . The InnerTube.xml file will have the URLs that the code above is tryign to call and we can figure out why one of them is
bad.
Thanks!
-Dan
As you can see, I've changed the "vq=" to "?q=" which is a well-formatted XML result.
Apologies for that, but thanks for finding the bug! Let me know if you can't get it to work