title: Reading an rss file in c# from a remote web server
body: <p>I can read the file rss from the remote web server.</p>
  
  <p>The problem I'm having is reading the contents of the rss file.
  I keep getting a error. I know what that is, I just don't know how to fix it.
  For some reason it errors out.
  here is the error</p>
  
  <p><code>Compiler Error Message: CS0103: The name 'xmlRSS' does not exist in the current context</code></p>
  
  <p>My code is below.</p>
  
  <pre><code>    using System;
      using System.IO;
      using System.Net;
      using System.Xml;
  
      public partial class _Default : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              string xmlsrc = "http://......../News.rss";
              string Password = "myPsw";
              string UserAccount = "myAcc";
              string DomainName = "myDom";
              string xslsrc = "RSS91.xsl";
  
              if (xmlsrc != "")
              {
                  HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(xmlsrc);
  
                  if (UserAccount != "")
                  {
                      wr.Credentials = new NetworkCredential(UserAccount, Password, DomainName);
                  }
  
                  wr.Timeout = 10000;
                  WebResponse resp = wr.GetResponse();
                  Stream stream = resp.GetResponseStream();
  
                  XmlTextReader reader = new XmlTextReader(stream);
                  reader.XmlResolver = null;
                  XmlDocument doc = new XmlDocument();
  
                  doc.Load(reader);
  
                  xmlRSS.Document = doc;
  
                  }
  
              xmlRSS.TransformSource = xslsrc;
          }
      }
  </code></pre>