Hi<BR><BR>I&#039;m trying to access an xml document outside my site root to do some manipulation and I&#039;m getting an error (on the while statement): <BR><BR>The remote server returned an error: (401) Unauthorized. <BR><BR>I guess this is because I don&#039;t have permissions on the file but I&#039;ve been trying to set credentials before the file access. Can any one see what I&#039;m doing wrong - Heres my code:<BR><BR> WebClient oWebClient = new WebClient();<BR> NetworkCredential oCred = new NetworkCredential("sysuser", "jo1lkj");<BR> oWebClient.Credentials = oCred;<BR> String strURL = "http://validURL/XMLPage.xml";<BR> Stream oStream = oWebClient.OpenRead(strURL);<BR> StreamReader oSR = new StreamReader(oStream);<BR><BR> XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());<BR> oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;<BR><BR> while(oXmlRdr.Read()) { <BR>// ... xml manipulation<BR> } <BR><BR>// close the object and free up memory<BR> oXmlRdr.Close(); <BR> oStream.Close(); <BR><BR><BR>Thanks<BR><BR>Ian B