Hi,
I want to know how to Implement a WCF code in Visual Studio 2010. Mainly, I want to know that when we write a code for WCF services Application, then how it will provide a services to any application.
Thanks,
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin MorePosted Sep 15, 2011, 1:41 AM
if u r ready with WCF service....now addserviceReference to ur client project by discovring it......n create object of service client class...n by that object initialize event handler by object.methodnameComplited n then call object.methodnameAsync()
like this
ServiceReference1.Service1Client svc= new ServiceReference1.ServiceClient();
private void button8_Click(object sender, RoutedEventArgs e)
{
svc.GetPendingClientsCompleted += new EventHandler<GetPendingClientsCompletedEventArgs>(svc_GetPendingClientsCompleted);
svc.GetPendingClientsAsync(0, 10, "", "", " "); //pass parameters
}
void svc_GetPendingClientsCompleted (object sender, GetPendingClientsCompletedEventArgs e)
{
dataGrid1.ItemsSource = e.Result;
}
i hope this info relate to ur quetion or else tell me if i didnt got question.....
Thank You,
Pravin