Skip to main content

Microsoft Silverlight

Unanswered Question Silverlight with WCFRSS Feed

(0)

baskarg83
baskarg83

Member

Member

394 points

127 Posts

Silverlight with WCF

 Dear Experts

i have created a WCF application and i added the WCF service to my silverlight application,

  ObservableCollection<SilverlightChartControls.AzureStorageService.DataEntity> newChartValues = new ObservableCollection<SilverlightChartControls.AzureStorageService.DataEntity>(); 

private void GeList()
        {
           
            AzureStorageService.AzureStorageServiceClient azureStorageClient = new SilverlightChartControls.AzureStorageService.AzureStorageServiceClient();
            azureStorageClient.GetDataCompleted += new EventHandler<SilverlightChartControls.AzureStorageService.GetDataCompletedEventArgs>(azureStorageClient_GetDataCompleted);
            azureStorageClient.GetDataAsync();
           
        }


        void azureStorageClient_GetDataCompleted(object sender, SilverlightChartControls.AzureStorageService.GetDataCompletedEventArgs e)
        {
     
            var data= e.Result;
          
            data.ToList<SilverlightChartControls.AzureStorageService.DataEntity>().ForEach(x => newChartValues.Add(x));

            populateChart();
        }

Here e.Result, i getting the list from the WCF , and in the next line am trying to add to my ObservableCollection called newChartValues,

But , In (x => newChartValues ) the first value is added , when adding second value its throwing an error called

 "ArugumentNullException was unhandled by user code
Value cannot be null.
Parameter name: category"

 

Can any tell me how to solve this,

Even i have see this link 

http://forums.silverlight.net/forums/t/97526.aspx, but cant fix my problem

Thanks in advance

esite
esite

Participant

Participant

1308 points

290 Posts

Re: Silverlight with WCF

Hi,

Just run fiddler when you request that service to see what the details are of the error.

Please mark replies as answers if they answered your question.

Anton Swanevelder
eSite Solutions

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

2485 points

284 Posts

Re: Silverlight with WCF

Hi,

   It seems that your service returned you a null value. The invoking logic you posted here is nothing wrong. But it's not enough for us to judge the problem.

   You may upload your program to skydrive.live.com , if it's ok.  So that we can reproduce the program.

Best Regards 

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities