private void GetEmotions() { var httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement(); httpBindingElement.MaxBufferSize = 2147483647; httpBindingElement.MaxReceivedMessageSize = 2147483647; CustomBinding binding = new CustomBinding(new BinaryMessageEncodingBindingElement(), httpBindingElement); EndpointAddress address = new EndpointAddress(new Uri(Application.Current.Host.Source, "/SinaDesktop.Web/SinaService.svc")); SinaDataService.DataServiceClient svc = new SinaDataService.DataServiceClient(binding, address); svc.GetEmotionsCompleted += client_GetEmotions; svc.GetEmotionsAsync("image", "xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret); }