How to Consume WCF service to Asp.Net Core


In this article we will undestand how we can consume Wcf Service into Asp.Net Core application.




In Asp.Net core we cannot create WCF service as core don't support WCF development. but it doesn't mean we can't consume Wcf service in core project.

However in Asp.Net Core there is a slight difference in Consuming WCF Service. In Asp.Net core you will notice that, we don’t have the option “Add Service Reference like in the older .Net Framework.

Step 1 : 

You will find Connected Service into your solution, Double click on Connected Service. show below in ref 1 screen. once you click on Connected Service then ref 1.1 screen will be display.


ref 1


ref 1.1 


Step 2 : 

click on the configure button [Microsoft WCF Web service reference provider]. configure screen will be open.

ref 2



Step 3 :

In the configure WCF Service reference dialog, you can either provide the URL of the service or you can try the discover option, which will display all the services inside the current solution.

ref 3


Once we click in Finish button nuget will Add below package in project.json file as screen shot shown below.

ref 4


Above screen shows you wcf is ready to use.

No comments

Powered by Blogger.