title: Compile error CS1647 when opening large aspx file in browser
body: <p>I am using XML/XSLT to create an aspx page which can grow quite large. Even though the file is successfully created, when the file size approaches 300K, the error: “CS1647: An expression is too long or complex to compile” is issued when opening the file in a browser (tried both IE and Chrome). No other useful information is shown on the failed .NET error page. </p>
  
  <p>My development environment is VS 2012 Express for Web on a Win7 x64 laptop.</p>
  
  <p>Since this problem does not occur during the execution of the program, I am at a loss as to how to approach solving this problem. Can anyone suggest a strategy or work around to this issue?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The C# code used to create the aspx page is</p>
  
  <pre><code>// load the xml file
  XmlDocument reportDetails = new XmlDocument();
  reportDetails.Load(ReportDetailsPath);
  //setup the xslt transform
  XslCompiledTransform xslt = new XslCompiledTransform();
  xslt.Load(XlsRptPath);
  StringWriter sw = new StringWriter();
  xslt.Transform(ReportDetails, null, sw);
  //create the aspx file
  using (StreamWriter outfile = new StreamWriter(aspxPath))
  {
      outfile.Write(sw.ToString());
  }
  </code></pre>