title: Cannot fix Improper Restriction of XML External Entity Reference error
body: <p>I have changed the code when trying to fix Veracode error for <code>Improper Restriction of XML External Entity Reference</code>, but it did not fix it.</p>
  
  <p>Here is the code I have now:</p>
  
  <pre><code>XmlDocument xmlDoc=new XmlDocument();
  using (System.IO.MemoryStream xmlstream = new System.IO.MemoryStream
  (Encoding.Default.GetBytes(dsEQ.GetXml().ToString())))
  {
      XmlReaderSettings settings = new XmlReaderSettings();
      settings.DtdProcessing = DtdProcessing.Prohibit;
      using (XmlReader xmlreader = XmlReader.Create(xmlstream, settings))
      {
          try
          {
              xmlDoc.Load(xmlreader);
          }
              catch(XmlException e)
          {
              Connection.LogError(e.ToString(), e.Message);
          }
      }
  }
  </code></pre>
  
  <p>However, Veracode still point out on this section of code with the same error message.</p>
  
  <p>Is there anything else that I should do to fix it? We do not have any external references, everything is through intranet.</p>