HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); request.Credentials = new NetworkCredential(user, password); HttpWebResponse response = (HttpWebResponse)request.GetResponse();