Create Asynchronous client to consume WCF created with SVCutil.exe RRS feed

  • Question

  • I have my WCF which only returns a Boolean, has the contract created and within the WCF tests everything works correctly. The problem arises when I create the client and it does not execute the methods asynchronously.

    I need to know if there is a way for the methods to run asynchronously.

    Is there a way to generate an asynchronous method with the SVCUtil that works?

    This is my interface

     public interface IService1
        bool booleanMethod ();

    TestWCF.svc class

      public class TestWCF: IService1
          public bool BooleanMethod ()
              return BooleanMethod();

    After this I generate my class with the svcUtil statement in the Developer Command Prompt.

    The created file is placed in my Xamarin Project and it works correctly when I use my normal method, but when using the same method asynchronously it gives me an error.

      bool Result = Test.BooleanMethod (); // Execute correct
      bool ResultAsync = Test.BooleanMethodAsync (); // It does not execute correctly

    Can someone help me with the client's asynchronous calls?

    Tuesday, March 20, 2018 5:29 PM

All replies