ReportViewer - ASP.NET : HTTP 404 : Not Found RRS feed

  • Question

  • Hello,

    I'm trying to show a report with ReportViewer  and this configuration :

    W2K3 R2 64 + SQL Server 2008 R2 + VS 2008 SP1 - ASP.NET - .Net 3.5

    In "Reporting Services Configuration Manager" I set all parameters, specialy Report Manager Url with virtual diractory =  Reports_ABCD and Urls = http://myservername/Reports_ABCD 

    This Url runs. I can get my reports in IE with it.

    I develop a ASP.NET page with ReportViewer. As my SQL server is not in the same AD, I use for authification this code (http://social.msdn.microsoft.com/Forums/en/vsreportcontrols/thread/5aa7eee7-d4a7-427a-ab8d-7a3d4d4f0bf3) It works. If, I change my ID I have a error message : HTTP 401 : Unauthorized

     My code :

    CustomReportCredentials crc = new CustomReportCredentials(loginname, pwd, AD_name);
    ReportViewer2.ServerReport.ReportServerCredentials = crc;
    ReportViewer2.ProcessingMode = ProcessingMode.Remote;
    ReportViewer2.ServerReport.ReportServerUrl = new Uri("http://myservname/Reports_ABCD");
    ReportViewer2.ServerReport.ReportPath= "/REPORTING_XYZ/Test/Test";
    ReportViewer2.ShowParameterPrompts = true;

    I have this message :

    Failure of the attempt at connection to the server of reports. Check your information of connection and ensure you that the version of the server of reports is compatible. The request failed with the state HTTP 404 : Not Found

    In SQL Server logs :

    ui!ReportManager_0-12!1390!01/20/2011-12:15:05:: Unhandled exception: System.Web.HttpException: The file '/Reports_ABCD/ReportExecution2005.asmx' does not exist.
      at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
      at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
      at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
      at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
      at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
      at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
      at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    I don't understand : System.Web.HttpException: The file '/Reports_ABCD/ReportExecution2005.asmx' does not exist.

    Thnaks for your help.








    Thursday, January 20, 2011 11:22 AM


All replies

  • Looks like you are specifying the Report Manager URL on ServerReport.ReportServerUrl.  You need to specify the Report Server URL:

    ReportViewer2.ServerReport.ReportServerUrl = new Uri("http://myservername/ReportServer_ABCD");
    Hope that helps
    Friday, January 21, 2011 12:59 AM
  • Hello Tristan,


    Thank you for your answer. Unfortunately, I've already specified the ReportServer Url.

    When I use this Url, it works in IE.

    Friday, January 21, 2011 9:16 AM
  • Just to clarify, which URL are you setting on ServerReport.ReportServerUrl?:  http://myservername/Reports_ABCD (Report Manager URL) or http://myservername/ReportServer_ABCD (Report Server URL)

    You need to specify the second URL, Report Server URL.  If you're already using the Report Server URL, what error are you getting?  The same as above?

    • Proposed as answer by Challen Fu Monday, January 24, 2011 8:47 AM
    • Marked as answer by Dreg_azerty Monday, January 24, 2011 4:29 PM
    Friday, January 21, 2011 6:36 PM
  • Hello Tristan,

    It works !! Thank you very much !!!!!!!

    Monday, January 24, 2011 4:29 PM
  • I came across this post while researching the same issue on my website but the solution here was not applicable while the error was the same.  I was able to figure out my issue and thought I would post it here as well since the error is the same but for a different reason.

    I have an IIS7 install on an internal server located at ip  Navigating to this site in the browser displays the standard IIS7 splash screen.  Not a problem.  I have my instance of SSRS running on a virtual directory folder called "reports" which is accessed by the users as  I set that up weeks ago.

    Last week I moved an intranet site to the same server and placed it in folder called c:\sites away from the inetpub directory.  I added an entry to the hosts file for mysite and added the site to IIS with the mysite host header record.

    Everything going well according to plan, HOWEVER, the site I moved and configured ALSO had a sub folder (not a virtual directory) called "reports".   Here is the problem... when trying to access anything in that folder I was getting the 404: error saying either the page did not exist of there was a configuration problem.   Spending the better part of the day thinking it had to do with the reportview controls on the pages in that folder I tried various things...  I even put a blank page in the folder with no good results.  I moved that blank page to another folder and it worked.  Then it dawned on me that the only difference between the 2 folders was that the reports folder was named the same thing as the virtual directory on in the SSRS root website.

    I report names the "reports" folder on the moved website to "rpts" (whatever) and then the reporting on the website started working, no questions asked!. 

    I have not seen mention of this anywhere so if it helps someone, GREAT!


    Monday, January 27, 2014 10:03 PM