This is a migrated thread and some comments may be shown as answers.

Error when rendering report

7 Answers 510 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 2
Iron
Kenneth asked on 02 Sep 2015, 12:56 PM

I have a working Silverlight web app using telerik reports. I moved it to a new server and now I get the error below.  The production web site runs on the same box as the sql server that is providing the data. At first I thought it was the connection string because there was an error in it, but I corrected that and can run the report from the dev machine using that connection string. I have ensured that the deployed application is in sync with the dev box – all files are identical.

I put logging code in the data class  for the objectdatasource that the report engine uses to retrieve data from the database and that code is never run, so it looks like the error is happening on the server somewhere after the ReportService.svc and before the telerik reports use the objectdatasource to retrieve records.

An identical deploy (with a different connection string) to a different server last week works just fine. I would think there is a file missing or an old version somewhere causing the problem but the only critical files outside of telerik are the Silverlight xap file which sets the .Report property of the ReportViewer and the DLL with the report designers and data class, and both of these files are correct and up to date, and both work from the dev box using the same connection string that points to a remote sql server.  I can preview the report from the dev box and run the application and view the reports.

So can you tell me what this error means? What is NotFound? The db server? The designer class?

To me it looks like a connection string error message – it could not find the db server, but that is very unlikely.  Is there a way to trace this out on the server?

Error: System.Reflection.TargetInvocationException : An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Telerik.Reporting.Service.SilverlightClient.RenderAndCacheEventArgs.get_RenderingResult()
   at Telerik.ReportViewer.Silverlight.ReportViewerModel.OnRenderAndCacheCompleted(Object sender, RenderAndCacheEventArgs e)

------------- InnerException: -------------

System.ServiceModel.CommunicationException : The remote server returned an error: NotFound.
   at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
   at proxy_2.EndRenderAndCache(IAsyncResult )
   at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnEndRenderAndCache(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)

------------- InnerException: -------------

System.Net.WebException : The remote server returned an error: NotFound.
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)

------------- InnerException: -------------

System.Net.WebException : The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)

7 Answers, 1 is accepted

Sort by
0
Kenneth
Top achievements
Rank 2
Iron
answered on 03 Sep 2015, 04:53 AM

Ruled out bad connection string.  With a purposefully bad one it times out the shows a report with no data.

 Code works on my dev box AND on my local test server, does not work on my two production servers. I know I'm missing something.

 If the telerik folks could tell me what the error is targeting it may help me to know where to look.

0
Kenneth
Top achievements
Rank 2
Iron
answered on 03 Sep 2015, 04:28 PM

Is seems that bufferoverflow in this case is not an error, just an indicator that all the data could not be read so subsequent reads are needed.

 Still looking for a solution.

0
Kenneth
Top achievements
Rank 2
Iron
answered on 03 Sep 2015, 06:09 PM

I fixed this on one of the failing servers - so now I've got four working and one still not working.

 The fix for the one was to configure the telerik portions of the web.config file for HTTPS.

The remaining server that does not work does NOT use HTTPS, so I copied the web.config from another server that also does not use HTTPS and it still refuses to work.

 So I've got two ​identical deployments on tow non-HTTPS machines, one works and one does not.  The one that works has public access enables for the sql server so I did the same on the other - no help.

 Still looking for a solution.

0
Kenneth
Top achievements
Rank 2
Iron
answered on 03 Sep 2015, 09:30 PM

According to fiddler:

"405 - HTTP verb used to access this page is not allowed.

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access."

 In IIS7 all verbs are allowed.  Extension .svc is allowed.  I explicitly allowed everything with no effect.

 

 

0
Accepted
Kenneth
Top achievements
Rank 2
Iron
answered on 03 Sep 2015, 09:59 PM

HA - Solved.

So this error is somewhat common because it is basically a connection issue and that can be caused by a lot of things.

In my case there were two distinct reasons I was getting it: Improper endpoint bindings in the web.config file (HTTP vs HTTPS) and WCF HTTP Activation not be turned on on the server.

For other with this problem I suggest your first test is to try and open the ReportServices.svc file in a browser.  If that fails then look at your server, either IIS request handlers or the WCF thing, or who knows what else.

If it does load in a browser then look at the web.config file closely.

 Also Fiddler is your friend.

Here is a screen shot of my fix.

0
John
Top achievements
Rank 1
answered on 10 Jan 2019, 10:18 PM

The WCF HTTP Activation checkbox was the cause on my Windows 10 VM, but not the only cause on the standalone Windows 10 machine. There, I get the error message in your OP. I don't understand what to change to what if the endpoint bindings are my remaining problem. This segment of the web.config is the same in both machines:

      <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior">
        <endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService" />
        <endpoint address="resources" binding="webHttpBinding" behaviorConfiguration="WebBehavior" contract="Telerik.Reporting.Service.IResourceService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>

Should I suspect this or something else?

0
Silviya
Telerik team
answered on 15 Jan 2019, 01:04 PM
Hi John,

I noticed that you've opened a support ticket on the same topic. Let me post my answer here as well:
"In general, Reports are processed and rendered on the server machine where the Reporting WCF service is running. From the provided Fiddler log file, I noticed that the error occurs on local environment.

The exception thrown in the viewer is a generic one and it might be due to various reasons. In order to get more information about the actual problem please double-check the following:
- when accessing the .svc file directly in your browser (e.g.  http://mylocalserver/ReportService.svc), there is a 500 Internal Server Error. That could mean that the service is not configured correctly. In our examples, we've point the assembly version explicitly"
<%@ServiceHost Service="Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, Version=12.2.18.1129, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" %>
 
Please check if the version corresponds to your current installed.
- also, the stack trace shows that the server is returning a "NotFound" error for the request which makes us think that there might be a problem with the assembly versions. To make sure that everything is updated correctly after the upgrade, please run the Upgrade Wizard on your solution. "


Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Kenneth
Top achievements
Rank 2
Iron
Answers by
Kenneth
Top achievements
Rank 2
Iron
John
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or