I received the same error when I tried to access the site without setting the user-agent header. I was able to get the distrowatch page with the following code (WebClient is much easier to use than WebRequest):

1
2
3
4
5
#light
open System.Net
let client = new WebClient()
client.Headers.["user-agent"] <-  "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1"
let distro = client.DownloadString("http://distrowatch.com")

Hope that helps!

By on 8/16/2008 8:01 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper