silverlight调用wcf后无法执行

private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
{
platformClient = new PlatformDB.PlatformDBClient();
platformClient.GetEntityDataCompleted += new EventHandler(platformClient_GetEntityDataCompleted);
platformClient.GetEntityDataAsync();
}
void platformClient_GetEntityDataCompleted(object sender, PlatformDB.GetEntityDataCompletedEventArgs e)
{
try
{
if (e.Result != null)
{
foreach (var item in e.Result)
{
TreeViewItem tviItem = new TreeViewItem() { Header = item.EntityIsBelong };
foreach (var items in item.dirEntity)
{
if (items.Key == item.EntityIsBelong)
{
foreach (var entity in items.Value.OrderBy(c => c.IsEntity).ToList())
{
TreeViewItem tvItem = new TreeViewItem() { Header = entity.EntityName };
tviItem.Items.Add(tvItem);
}

}
}
tvEntity.Items.Add(tviItem);
}
}
}
catch
{
}
}
这是完整的程序代码,执行后,程序无法进入 platformClient_GetEntityDataCompleted ,导致程序运行不起来。WCF 有数据返回。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问