1: 2: 3:
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(URL); webRequest.Credentials = new NetworkCredential(UserName, Password); return (HttpWebResponse)webRequest.GetResponse();