WebClient webClient = new WebClient(); webClient.Credentials = new NetworkCredential("username", "password"); webClient.Credentials = CredentialCache.DefaultCredentials; XmlTextReader que = new XmlTextReader(webClient.OpenRead(new Uri(filePath, UriKind.Absolute))); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(filePath); Stream responseStream = request.GetResponse().GetResponseStream(); string stringResponse = string.Empty; using (StreamReader responseReader = new StreamReader(responseStream, Encoding.UTF8)) { stringResponse = responseReader.ReadToEnd(); } responseStream.Close();