Web Site Syndication
One of the things thats been on my mind for a while has been to update my web site, and make it a central point of syndication. I've got several different websites that I am contantly updating but they're all running different application, and all with different purposes, but there is no central location where you can get information. And for the last few days, I've been slowly working on a central syndication site. http://www.NoCommonGround.com is the first of several steps that I want to take.
It currently has 3 working syndications, (1) from my snap shot photo web site, (2) my LiveJournal blog, which I mostly use to talk to friends, and see what they're all up to, and lastly (3) the syndication of the MSDN feed that I write in. I've got one more that I will definately be syndicating on to there soon, and thats the fine art photography that I do.
I had a few problems getting the syndication to work properly. It seems that my ISP has a proxy server set up for outgoing connections, and when I was trying to read the schemas for some places, it was trying to import a schema from another site and was dying. After some little work, I managed to figure out how to get the schema to sit on my computer, and then use a System.Net.WebRequest to do the request to get the RSS feed, and told it to ignore the schema in the file.
lblBlogTitle.Text = BlogTitle;
DataSet dsBlog = null;
dsBlog = (DataSet)Cache.Get(BlogRSSFeed);
if (dsBlog == null)
System.Net.WebProxy myProxy = new System.Net.WebProxy("http://Proxy:8080/", true);
dsBlog = new DataSet();
System.Net.WebRequest wr = System.Net.WebRequest.Create(BlogRSSFeed);
wr.Proxy = myProxy;
System.Net.WebResponse wresp = wr.GetResponse();
dsBlog.ReadXmlSchema(Server.MapPath("~") + "\\App_Data\\rss_schema.xsd");
Cache.Add(BlogRSSFeed, dsBlog, null, DateTime.Now.AddHours(1), System.Web.Caching.Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);
You can see how I overrode the web request and used a proxy. If I hadn't needed to use the proxy, you can simply use dsBlog.ReadXml(http://feed) which is pretty sweet! I also added the one hour cache in there to reduce the bandwidth on the servers, so everything sits in cache for up to one hour.
I've still got lots to do on this, but its a start!
What features would you want to see if this were your site?