Hi, I'm having trouble connecting to my data in my report that I have created using Visual Studio 2012. I followed the walkthrough for "Creating a Simple Tabular Report" which was very simple. I then followed the "How to Display a Reporting Using the HTML5 Report viewer" which is where I'm encountering errors. I have the HTML5 Report Viewer loading properly, but the data never fills in. The Report Viewer throws the error Cannot establish connection with the Report Server. The console in Google Chrome states that there is a 404 error,
If you're using the MVC framework, you may need to add the following ignore route (This is MVC4 syntax):
routes.IgnoreRoute("{*allServiceEndpoints}", new { allServiceEndpoints = @".*\.svc(/.*)?" });
This will prevent the MVC framework from trying to process requests ending in a '.svc' extension, specifically preventing accessing the 'ReportService.svc' endpoint.
After reworking the URI path and making sure the IIS server was setup correctly I got rid of the 404.3 error. Now I'm stuck on a 500 error, System.ServiceModel.ServiceActivationException
EDIT: Corrected the 500 Error, but now encountering
Error in DataContext =DataSources.sqlDataSource1
Christopher, I think your service path is still wrong. The '/' at the begin isn't correct. Try first find the URI path where the service is using a browser. Then, when you know the absolute path, make it relative to the HTML page path.
I corrected the URI in the view where the Javascript builds the reportViewer, was that the proper location?
Example of the code: // var serviceEndpoint = "/MvcApplication3/ReportService1.svc/ajaxAddress/"; //var serviceEndpoint = "ReportService1.svc/ajaxAddress/"; $.ig.loader({ cssPath: 'Styles', scriptPath: 'Scripts', resources: 'igReportViewer', //locale: 'en-US', ready: function () { $(function () { $("#viewer").igReportViewer({ width: 800, height: 700, renderSettings: { definitionUri: "/MvcApplication3;component/Report1.igr", serviceEndpointUri: serviceEndpoint } }); }); } });
// ]]>
If I try to access the svc file following the path I get 404.3 error. HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. I also followed your web.config if that helps.
Hi Christopher,
Take into acount that when you deploy on IIS, the services URI changes. The URI is different. Did you change it in the HTML report viewer render settings?