i have created wcf application with duplex .i am getting error like "callback does not implement interface member ServiceReffernce1.IServiceCallback.BeginResult.code is like this
public class callback :ServiceReference1.IServiceCallback
{
public callback()
{
//
// TODO: Add constructor logic here
//
}
public static string info1;
public void Result(string info)
{
info1 = info;
}
}
InstanceContext ic = new InstanceContext(new callback());
ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient(ic);
client.PlaceOrder(int.Parse(TextBox1.Text));
Timer1.Enabled = true;
When you use the duplex contract you must implement the callback interface in the client side. Then it can receive messages from the service. You can refer to the below link about how to use the duplex contract and implement the callback interface.
veerendranad...
Member
46 Points
65 Posts
callback does not implement interface member in wcf duplex binding
Feb 23, 2012 04:36 AM|LINK
hi all
i have created wcf application with duplex .i am getting error like "callback does not implement interface member ServiceReffernce1.IServiceCallback.BeginResult.code is like this
public class callback :ServiceReference1.IServiceCallback { public callback() { // // TODO: Add constructor logic here // } public static string info1; public void Result(string info) { info1 = info; } } InstanceContext ic = new InstanceContext(new callback()); ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient(ic); client.PlaceOrder(int.Parse(TextBox1.Text)); Timer1.Enabled = true;Qi Wu - MSFT
Contributor
5794 Points
677 Posts
Re: callback does not implement interface member in wcf duplex binding
Feb 27, 2012 07:22 AM|LINK
Hi,
When you use the duplex contract you must implement the callback interface in the client side. Then it can receive messages from the service. You can refer to the below link about how to use the duplex contract and implement the callback interface.
http://msdn.microsoft.com/en-us/library/ms731064.aspx
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework