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

System.Reflection.TargetInvocationException Error after upgrading to SP1

3 Answers 320 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pediatric Computing
Top achievements
Rank 1
Pediatric Computing asked on 18 May 2011, 03:05 PM
I was using the SilvelightClient's ListAvailableReports to get a listing of the reports to populate a ComboBox so a user could choose which of the reports to view. This was working perfectly, but this morning I installed the Reporting Q1 2011 SP1 and upgraded the reports in my project to that new SP 1 version.

The Telerik.Reporting.Service.SilverlightClient.ListAvailableReportsEventArgs that gets returned in the completed method is now throwing a System.Reflection.TargetInvocationException error:

Exception:
{System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- End of inner exception stack trace ---
   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)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
   at proxy_3.EndListAvailableReports(IAsyncResult )
   at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnEndListAvailableReports(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Telerik.Reporting.Service.SilverlightClient.ListAvailableReportsEventArgs.get_Reports()
   at Xxxx.BillingReports.ViewModels.MainViewModel.client_ListAvailableReportsCompleted(Object sender, ListAvailableReportsEventArgs e)
   at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnListAvailableReportsCompleted(Object state)}

Thanks for the assistance!

3 Answers, 1 is accepted

Sort by
0
Pediatric Computing
Top achievements
Rank 1
answered on 18 May 2011, 03:07 PM
Here's the code I'm using:

void client_ListAvailableReportsCompleted(object sender, Telerik.Reporting.Service.SilverlightClient.ListAvailableReportsEventArgs e)
{
    this.AvailableReports = new List<Telerik.Reporting.Service.ReportInfo>();
 
    foreach (Telerik.Reporting.Service.ReportInfo r in e.Reports) // e.Reports sets off the TargetInvocationException error
    {
        this.AvailableReports.Add(r);
    }
 
    this.RaisePropertyChanged("AvailableReports");
    this._selectedReport = this.AvailableReports.FirstOrDefault();
}
0
Accepted
Chavdar
Telerik team
answered on 24 May 2011, 11:17 AM
Hello PCF,

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. If the problem still continues you can use Fiddler or FireBug to check the exact response from the server. As a last resort you can open a support ticket and send us a sample application which reproduces the problem so that we can investigate the problem locally.

All the best,
Chavdar
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Pediatric Computing
Top achievements
Rank 1
answered on 24 May 2011, 02:53 PM
Re-running the wizard worked!

Thanks!
Tags
General Discussions
Asked by
Pediatric Computing
Top achievements
Rank 1
Answers by
Pediatric Computing
Top achievements
Rank 1
Chavdar
Telerik team
Share this question
or