Friday, December 17, 2004

Bowl Record Update

So for I'm 1 for 1 with the Souther Miss win over North Texas in the New Orleans Bowl. Now I'll just have to wait until the 21st.

Thursday, December 02, 2004

Atom.NET

I found a great open-source library for interacting with Atom-capable blog sites like Blogger. This is MUCH more effective than the half-baked WSDL posted on the AtomEnabled site. There are also some helpful examples on the project site. Here's the VB.NET example of connecting to a blog through a proxy server translated to C#:

HttpWebRequest blogWebRequest = (HttpWebRequest)HttpWebRequest.Create("http://yourbloghere.blogspot.com/atom.xml");
WebProxy proxy = new WebProxy("proxy.someaddress.com", 8080);
blogWebRequest.Proxy = proxy;

try
{
   StreamReader responseStream = new StreamReader(
         blogWebRequest.GetResponse().GetResponseStream(),
         System.Text.Encoding.ASCII);

   myBlogFeed = Atom.Core.AtomFeed.Load(responseStream);
}
catch (System.Net.WebException webExc)
{
   MessageBox.Show(webExc.Message, "Web Exception");
}

I also played with the WebProxy.GetDefaultProxy() method to grab settings from IE, but wasn't able to get it working. I'm thinking it may be because the GetDefaultProxy() method will only get "nondynamic proxy settings" and at work we use a configuration script to set proxy. Oh, well. I'm going to continue tinkering with this library and see if I can actually post a new entry to my blog.

- Tony