I have an asp.net application with a SIlverlight IGReportingApp in the solution. It also contains a ReportService.
When I run the solution locally everything works great, data is desplayed in all the reports But, when I publish the solution to a WIndows 2008 R2 Server I then the error message
"Cannot establish a connection with the report server."
On my MainPage.xmal I have
="xamReportViewer1">
>
="http://localhost:58821/ReportService.svc" />
I also get this in the server's Event Viewer
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064
Exception: System.ServiceModel.ServiceActivationException: The service '/ReportService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'Infragistics.Reports.Server.ReportProcessorService, InfragisticsWPF4.Reports.Server.v11.2, Version=11.2.20112.1010, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.. ---> System.InvalidOperationException: The type 'Infragistics.Reports.Server.ReportProcessorService, InfragisticsWPF4.Reports.Server.v11.2, Version=11.2.20112.1010, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 4992
Hello jvinson703,
It looks like the error you're getting is because the WCF infrastructure is not able to find the required assemblies in your server. Please note in your local installation all Reporting assemblies are installed in the GAC. Thus, they are not required to be copied in the output directory of your project..
I would recommend you to check all your Reporting assemblies references and change their respective Copy Local setting to true. By doing that, you'll be sure all the required assemblies will be correctly published.
Please let me know if you need more help.
Regards,
Damián
Almost have it but still missing something
the path for the reports is
ServiceEndpointUri
=http://localhost/ADDM/ReportService.svc
ADDM is the Virtual Directory it is hosted in.
All reports work with that when they are browsed on the Server with IIS, however WHen on a remote browser they get the cannot connect message.
Should the url be changed to http://ip_address/ADDM/ReportService.svc
What should the url be?
here is your solution
http://blog.synsysit.com/microsoft-snake-biting-its-own-tail/
hope it helps
It should work with relative path, the problem might be in how the root directory is resolved in your configuration, please make sure you are considering any existing virtual path, such as: /ADDM/ReportService.svc
Miguel.
The relative path dows not work when displayed with IE in web browser, and also not in IIS
The only way I can get it to work on the web browsers is using the IP Address
Just following up, you can find more information on how to reference reports here.
If you're trying to run the Report Viewer in Silverlight, you can replace that absolute URI for a relative one:
ServiceEndpointUri="/ReportService.svc"
(I guess your Silverlight application is under the same virtual directory)
However, if you are working in WPF, you will have to do what you just mentioned, just put the IP address instead of localhost.
Please let me know if that worked.