title: The attempt to connect to the report server failed - Setting URL and Path in ASP.NET?
body: <p>I'm trying to connect to a <code>Report</code> (rdlc file) using ASP.NET Web Applications. I'm working with VS2010 and the <code>Report Server</code> is version 2008.</p>
  
  <p>I have the following URL to the report which works fine:</p>
  
  <pre><code>http://server url/Products/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Products/Dashboards/Product_tool.rdl&amp;Source=Server Url/Products/Dashboards/Forms/AllItems.aspx&amp;DefaultItemOpen=1
  </code></pre>
  
  <p>When i enter that URL in my browser it first asks for a username password. When i log in then the <code>Report</code> shows up just fine.</p>
  
  <p>Now i need to display this report in a <code>Report Viewer</code>. So i added a <code>Report Viewer</code> control to my <code>aspx</code> page. I configured the URls for it like so:</p>
  
  <p><code>Report Server:** http://server url/Products/_layouts/ReportServer</code></p>
  
  <p><code>Report Path:** /Products/Dashboards/Product_tool.rdl</code></p>
  
  <p>I'm not really sure if that is even correct..?</p>
  
  <p>In any case, in my <code>PageLoad</code> i have the following line of code:</p>
  
  <pre><code>eportViewer1.ServerReport.ReportServerCredentials = new ReportCredentials("myuser", "mypass");
  </code></pre>
  
  <p>The <code>ReposrtCredentials</code> class is taken from: <a href="http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/c65abca7-0fdb-40fb-aabe-718f63377a55/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/c65abca7-0fdb-40fb-aabe-718f63377a55/</a> (from Phil)</p>
  
  <p>Now when i run my Web Application i get the following error:</p>
  
  <blockquote>
    <p>The attempt to connect to the report server failed. Check your
    connection information and that the report server is a compatible
    version.</p>
  </blockquote>
  
  <p>Now i'm not sure if the URL i supplied to the <code>Report Viewer</code> is right? Or what the problem else could be.</p>
  
  <p>Anyone any idea..?</p>