Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Silverlight with WCF
2 replies. Latest Post by Min-Hong Tang - MSFT on November 5, 2009.
(0)
baskarg83
Member
394 points
127 Posts
11-03-2009 2:27 AM |
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 codeValue 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
Participant
1308 points
290 Posts
11-03-2009 3:40 AM |
Hi,
Just run fiddler when you request that service to see what the details are of the error.
Min-Hong...
Contributor
2485 points
284 Posts
11-05-2009 3:37 AM |
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