I created a wcf service and want to use service methods as Asynchronous in client side.I want to add Generate Asynchronous Operations programmatically using c#.
I want to add service reference through programatically, and select Generate asynchronous operations through programatically. Can you suggest how this can be done using c#
You can't directly add service reference programmatically.
The WCF client proxy can be generated within Visual Studio using the Add Service Reference feature. If you want to create proxy class without adding service reference, you could use
ChannelFactory class to generate service proxy.
Member
110 Points
254 Posts
How to add Generate Asynchronous Operations in WCF Programatically C#
Nov 04, 2016 03:22 AM|nrk_hi|LINK
I created a wcf service and want to use service methods as Asynchronous in client side.I want to add Generate Asynchronous Operations programmatically using c#.
</div> </div>All-Star
17652 Points
3510 Posts
Re: How to add Generate Asynchronous Operations in WCF Programatically C#
Nov 04, 2016 09:40 AM|Chris Zhao|LINK
Hi Nrk_hi,
You could start from the following article.
Asynchronous Operations in WCF
http://social.technet.microsoft.com/wiki/contents/articles/16346.asynchronous-operations-in-wcf.aspx
Best Regards,
Chris
Member
110 Points
254 Posts
Re: How to add Generate Asynchronous Operations in WCF Programatically C#
Nov 04, 2016 10:30 AM|nrk_hi|LINK
Hi Chris Zhao,
Thanks for reply, I have gone thorugh the article "http://social.technet.microsoft.com/wiki/contents/articles/16346.asynchronous-operations-in-wcf.aspx ", I want to add service reference through programatically, and select Generate asynchronous operations through programatically. Can you suggest how this can be done using c#
All-Star
17652 Points
3510 Posts
Re: How to add Generate Asynchronous Operations in WCF Programatically C#
Nov 08, 2016 07:40 AM|Chris Zhao|LINK
Hi Nrk_hi,
You can't directly add service reference programmatically.
The WCF client proxy can be generated within Visual Studio using the Add Service Reference feature. If you want to create proxy class without adding service reference, you could use ChannelFactory class to generate service proxy.
reference:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/bffba832-46bd-46da-b5ac-0406f173c435/add-wcf-service-reference-programatically?forum=wcf
http://stackoverflow.com/a/2943206
Best Regards,
Chris