简体   繁体   中英

Methods not showing up in WCF Client

I created a WCF ServiceContract with a few methods but when I add the reference to the client none of them show up. The WCF Test Client loads correctly and all the methods show up there. They also show up in the 'Add Service Reference' window when I try to add the service reference and click 'Go' ('Discover' does not bring anything up). What may be keeping the Interface on the client side empty?

Here is the code for the service with one method:

namespace WS
{
 [ServiceContract]
  public interface Itest
  {
    [OperationContract] method_name(int num);
 }
}   

The client app recognizes the namespace but does not find any methods in it.

Thanks!

Can you try using svcutil.exe and see if you are able to create a proxy file. If you are then you can try referencing that in you client project.

something like:

  svcutil.exe <<url where service is deployed>> /o:ClientProxy.cs

Try following things.

  1. Make sure your service is working using test client in visual studio.

  2. Update your service reference by right clicking on it.

  3. Or delete it and add new service reference again.

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