C# 具有WCF服务的Silverlight应用程序
我已经使用下面的代码片段从WCF服务获取数据C# 具有WCF服务的Silverlight应用程序,c#,wcf,silverlight,C#,Wcf,Silverlight,我已经使用下面的代码片段从WCF服务获取数据 EmployeeServiceClient serviceClient=new EmployeeServiceClient(); serviceClient.GetDataCompleted += new EventHandler<GetDataCompletedEventArgs>(serviceClient_GetDataCompleted); serviceClient.GetDat
EmployeeServiceClient serviceClient=new EmployeeServiceClient();
serviceClient.GetDataCompleted += new EventHandler<GetDataCompletedEventArgs>(serviceClient_GetDataCompleted);
serviceClient.GetDataAsync(5);
我的确切需求是将数据从服务加载到Silverlight主项目。
你能在这方面帮助任何人吗?提前谢谢
问候,
Rajasekar您可以发布wcf客户端的配置吗?可能需要使用而不是
System.ArgumentException occurred
Message=The provided URI scheme 'http' is invalid; expected 'https'.
Parameter name: via
StackTrace:
at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ClientBase`1.ChannelBase`1..ctor(ClientBase`1 client)
at GridDataControlSilverlightWCFService.ServiceReference1.EmployeeServiceClient.EmployeeServiceClientChannel..ctor(ClientBase`1 client)
InnerException: