I am Duplex wcf Service hosted on console. This is tested and Worked fine.
Now i want to consume this wcf service in Asp.net Core. I have done this using this link Consume WCF in Asp.net Core.
I am able to get response. But i am not getting any callback. Its just keep waiting.
public string GetData()
{
MyClinicalService.IClinicalService cc = new MyClinicalService.ClinicalServiceClient();
cc.InitilizeAsync();
object[] o = new object[1024];
Exception exception = new Exception();
object final = new object();
MyClinicalService.MyCallBackReceivedEventArgs eventArgs = new MyCallBackReceivedEventArgs(o, exception, true, final);
string str = cc.GetDataAsync(77).Result;
WriteResponse(str);
string str1 = eventArgs.result;
WriteCallBack(str1);
return WriteResponse(str).ToString();
}
At highlighted color i am not getting any callback.
Can someone Tell me how to get a wcf callback in asp.net core application