title: Why Does FireFox Not Include the .xml Extension when Downloading a File?
body: <p>OK. I'm sure it does download XML files with the .xml extension, but I'm wondering what is missing in the code here to cause the .xml extenstion to be missing from the downloaded file.</p>
  
  <p>Note: This works in IE 6+ (didn't try WebKit based browsers or Opera)</p>
  
  <pre><code>    private void GenerateXmlAttachment(string xmlInStringFormat, string fileName)
      {
      // Where fileName = "someFile.xml"
          HttpResponse response = HttpContext.Current.Response;
          response.Clear();
          response.Charset = string.Empty;
          response.ContentEncoding = Encoding.Default;
  
      response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
          response.AddHeader("Content-Length", xmlInStringFormat.Length.ToString());
      response.ContentType = "text/xml";          
  
      response.Write(xmlInStringFormat);
          response.Flush();
          response.End();
  
      }
  </code></pre>
  
  <p>Ideas anyone?</p>