string url = ""; string usernamePassword = username + ":" + password; HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url); myReq.Credentials = new NetworkCredential(username, password); //CredentialCache mycache = new CredentialCache(); //mycache.Add(new Uri(url), "Basic", new NetworkCredential()); // myReq.Credentials = mycache; //myReq.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes(usernamePassword))); //HttpWebResponse b = (HttpWebResponse)myReq.GetResponse(); //Stream stream = b.GetResponseStream(); //StreamReader content = new StreamReader(stream); WebResponse wr = myReq.GetResponse(); Stream receiveStream = wr.GetResponseStream(); StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8); string content = reader.ReadToEnd(); textBox1.Text = content + " " + textBox1.Text;