posts - 81, comments - 257, trackbacks - 0

November 2008 Blog Posts

Pulling Web Content with C#

A simple way to perform a 'wget' on a url with c#. This method will return the 'html source' of a webpage. static string GetContent(string url){ WebClient client = new WebClient(); client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); Stream data = client.OpenRead(url); StreamReader reader = new StreamReader(data); string s = reader.ReadToEnd(); data.Close(); reader.Close(); return s;}

posted @ Saturday, November 15, 2008 1:05 PM | Feedback (2) | Filed Under [ Web Programming ]

SVN + BSOD = Fresh Checkout

Note that if you get a BSOD during a commit/update its quite possible a fresh checkout is in order. This was definitely the case for me… Commit often :) (and replace RAM)

posted @ Saturday, November 1, 2008 8:42 PM | Feedback (3) |

Powered by:
Powered By Subtext Powered By ASP.NET