Friday, November 2, 2012

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. The request failed with HTTP status 404: Not Found.

Screenshot of Error in the Report Viewer
This error reads:
  • The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
    • The request failed with HTTP status 404: Not Found.

When I was searching for the cause of this error I was confused by the answer that I kept finding everywhere which was to start messing with host headers and the reporting server's configuration file. I found this to be a bit extreme since I knew that our (at work) SSRS instance is already in use by a report viewer in a desktop application. I am just trying to view the same set of reports in a web application instead.

Well it turns out I made a silly mistake, a gotcha if you will.

Gotcha
Make sure you are using the Web Service URL and not the Report Manager URL from your SSRS instance. Pretty obvious huh, but those URLs look similar at times. The next question is how do I find out what they are named if I don't know what they are called or I just want to double check? In order to answer this, you need access to the host machine where SSRS lives and you need to open up SQL Server 2008 R2 Reporting Services Configuration Manager.

Report Manager URL
You do not want to use this for your report viewer!

Web Service URL
You want to use this for your report viewer!
If this didn't answer your question, then maybe it really does have something to do with the host header and the reporting server's configuration.
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/530ed56d-7c84-4d13-8998-80a8bf142197/

I found my answer here for the record:
http://www.networksteve.com/enterprise/topic.php?TopicId=40367

Bonus Tip
If you add the ReportViewer control to your page and when you load the page it doesn't show up, then make sure you have set the Height and the Width of the control explicitly. By default it is as small as possible which makes it appear to be invisible (which is stupid in my opinion and not very helpful).

Using the control is pretty straight forward as you can see here.

20 comments:

  1. thanks.! helped me solve my issue today!

    ReplyDelete
  2. Many thanks Eli.. this help me resolve the issue.. not the FIX TO thing.. sigh...

    ReplyDelete
  3. Thanks Eli,

    Indeed you are a life saver, we have been struggling with this for days and came across your article.

    Keep it up!!!

    Regards,
    Mpho

    ReplyDelete
  4. Thank you Eli. Your suggested fix helped me a lot.

    ReplyDelete
  5. You made my day. I struggled for complete 1 day .Thank you Eli.

    ReplyDelete
  6. you are a life saver, Thanks for the article, I was stuck from past few days.

    ReplyDelete
    Replies
    1. No problem. I know what that's like which is why I write these articles :D

      Delete
  7. Your post did not save, but certainly ended several hours of attempts filled with frustration.
    Many thanks for publishing this simple info!

    Marius

    ReplyDelete
  8. thanks a lot.Before we have tried all scenarios but we couldn't succeeded.

    ReplyDelete