title: Report viewer Error message "client found response content type of '' but expected 'text xml' The request failed with an empty response."
body: <p>I'm getting the error </p>
  
  <pre><code>client found response content type of '' but expected 'text xml' The request failed with an empty response.
  </code></pre>
  
  <p>when I try to execute the following code.</p>
  
  <pre><code>//create a PDF from the SQL report
  ReportViewer rview = new ReportViewer();
  
  rview.ServerReport.ReportServerUrl = new Uri("http://server/ReportServer$MSSQL2K5?");
  
  List&lt;ReportParameter&gt; paramList = new List&lt;ReportParameter&gt;();
  paramList.Add(new Microsoft.Reporting.WinForms.ReportParameter("Batch", "1"));
  paramList.Add(new Microsoft.Reporting.WinForms.ReportParameter("InvoiceNo", "0"));
  rview.ServerReport.ReportPath = "Report/Report Invoice";
  
  rview.ServerReport.SetParameters(paramList);
  
  string mimeType, encoding, extension, deviceInfo;
  string[] streamids;
  Microsoft.Reporting.WinForms.Warning[] warnings;
  string format = "PDF"; //Desired format goes here (PDF, Excel, or Image)             
  
  deviceInfo =
  "&lt;DeviceInfo&gt;" +
  "&lt;SimplePageHeaders&gt;True&lt;/SimplePageHeaders&gt;" +
  "&lt;/DeviceInfo&gt;";
  
  byte[] bytes = rview.LocalReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
  </code></pre>
  
  <p>The error occurs on the line:</p>
  
  <pre><code>rview.ServerReport.SetParameters(paramList);
  </code></pre>
  
  <p>The address is correct as I can load the report fine via a web browser:</p>
  
  <pre><code>this.webBrowser1.Navigate("http://server/ReportServer$MSSQL2K5?/Report/Report Invoice&amp;Batch=1&amp;InvoiceNo=0");
  </code></pre>
  
  <p>I need to load the report with the report viewer so I can export as PDF. </p>