简体   繁体   中英

Consuming multiple WCF services from a single client

I have hosted two WCF services using a console application, one on port 8080 and the other at port 8090. I am able to create object for the first service named AccountManagementService but not for the other service named UserRegistrationService .

Snapshot below shows that two services have been added. 在此处输入图片说明

The second service doesn't show up in intellisense at all.

The complete details of the service used can be found at the following link(this is also a question asked by me): Hosting two WCF services using a single console app

I have tried multiple times deleting and creating new service but nothing seems to be working. Please suggest.

based on the image, it should be there. open the reference.cs file for the service that is not showing up in IntelliSense and check the namespace. Then Try creating the reference using the full name. to get to the reference.cs file, click on Show all files in solution explorer as shown below

在此处输入图片说明

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

foo.bar.WWWCF.UserRegistration ref = new foo.bar.WWWCF.UserRegistration ();

Found the solution. Not sure I understand the reason, though. But the following link has answers to my issue and has solved it.

Empty Reference.cs file issue solved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM