Consuming multiple WCF services from a single client

I have two WCF services using a console application, one on port 8080 and the other on port 8090. I can create an object for the first service named AccountManagementService , but not for another service called UserRegistrationService .

The snapshot below shows that two services have been added. enter image description here

The second service does not appear in intellisense at all .

Full information about the service used can be found at the following link (this is also a question asked by me): Hosting two WCF services using one console application

I tried repeatedly deleting and creating new services, but nothing works. Please suggest.

+1
source share
2 answers

Found a solution. Not sure if I understand the reason. But the following link has the answers to my problem and solved it.

File.cs file issue fixed

0
source

based on the image, it should be there. open the reference.cs file for a service that does not appear in IntelliSense, and check the namespace. Then try to create the link using the full name. To go to the reference.cs file, click Show All Files In Solution Explorer, as shown below.

enter image description here

for example, if in reference.cs you see the namespace WWWCF.UserRegistrationas foo.bar.WWWCF.UserRegistration, then create an instance using

foo.bar.WWWCF.UserRegistration ref = new foo.bar.WWWCF.UserRegistration ();
+2
source

Source: https://habr.com/ru/post/1535825/


All Articles