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

Exception Handling with ReportService

4 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 23 Feb 2011, 07:01 PM
Hi,

I am trying to track down an error I am experiencing with large data sets being passed back to my Silverlight ReportViewer.  I can't really tell what exception I am receiving, because the message that gets displayed in the ReportViewer says to look at the InnerException, which I have no access to.

I think this may be related to my binding setup (message size, timeout, etc.).  I have already gone through the steps listed on the forum for creating a custom ClientFactory, and configured these binding properties following that documentation.  I have also configured the ReportService binding server-side to have increased timeouts and message sizes.  

In addition, I have even tried setting breakpoints in the async completed events to check the Error property (LoadPage, Render, RenderAndCache, etc.)  When my error occurs, it doesn't fire the async completed event.  

Currently, I have a WCF trace set up to see if I can hunt down the exception, but I'm having trouble interpreting the data in the trace.  Is there anything else I can be doing to trap the error in the ReportService, so I can know exactly what is going wrong?

Thanks,

Rob

4 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 23 Feb 2011, 08:02 PM
Update:

I have been using Fiddler to trace the requests and responses from the ReportService.  I am seeing no errors in the responses when they come back, so it does look like the client times out before the response makes it back.  

The problem is, I have verified that the Open, Send, Receive, and Close timeouts are set by following this link.  I have also been reading through this post but nothing is standing out at me.  It still appears that my client times out after 1 minute, despite setting it to 10 minutes and bumping up the message size to int.MaxValue.

Here is the code-behind of my control class:

public partial class Completions : Page, IReportServiceClientFactory
    {
        private ReportServiceClient _c;
 
        public Completions()
        {
            InitializeComponent();                       
            completionsReportViewer.ReportServiceClientFactory = this;
        }
 
 
 
        private void SetOwnerId(object sender, RenderBeginEventArgs args)
        {
            // Remove all current filters
            if (args.ParameterValues.ContainsKey("ownerId"))
               args.ParameterValues.Remove("ownerId");
            if (args.ParameterValues.ContainsKey("ownerName"))
               args.ParameterValues.Remove("ownerName");
 
            // Add back fresh versions of all current filters
            args.ParameterValues.Add("ownerId", WebContext.Current.User.OwnerId.ToString());
            args.ParameterValues.Add("ownerName", WebContext.Current.User.OwnerName);
 
        }
 
        public ReportServiceClient Create(Uri remoteAddress)
        {
            var b = new BasicHttpBinding
                        {
                            OpenTimeout = new TimeSpan(0, 0, 10, 0),
                            CloseTimeout = new TimeSpan(0, 0, 10, 0),
                            SendTimeout = new TimeSpan(0, 0, 10, 0),
                            ReceiveTimeout = new TimeSpan(0, 0, 10, 0),
                            MaxReceivedMessageSize = int.MaxValue,
                            MaxBufferSize= int.MaxValue,                           
                        };
            var a = new EndpointAddress(remoteAddress);
            _c = new ReportServiceClient(b, a);
                         
            return _c;
        }

0
Rob
Top achievements
Rank 1
answered on 23 Feb 2011, 08:52 PM
Update:

I just used reflector to view the controls source. It looks like all exceptions are trapped and suppressed in the RenderAndCacheCompleted event handler in the ReportViewerModel class.  The message returned by the ReportViewerModel.Error property is useless, because the exception message is just a wrapper around the real inner exception.  This is preventing me from getting the exception out of my report client...
0
ben
Top achievements
Rank 1
answered on 15 Apr 2011, 03:56 PM
I am having the exact same problems with large data through-put, it seems the client timeout is 1 min although i've bumped all the timeouts up as Rob did.

Do we have any updates or steps to resolve this issue?
0
Rob
Top achievements
Rank 1
answered on 15 Apr 2011, 04:02 PM
What version of Telerik.Reporting are you using?  After I updated my .dll's to the latest release the problems seemed to go away.  I was seeing the problem in the release from Fall 2010.

Here is a ticket I released with more info, including a test project you can use: 

http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=397757



Tags
General Discussions
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
ben
Top achievements
Rank 1
Share this question
or