title: How to access WCF in a IIS using a .Net Standard class
body: <p>I built a WCF component resident in IIS. I have tested it and it appears to work correctly, however I'm trying to access it via the .NET <code>Standard</code> Class without success. </p>
  
  <p>Could someone exemplify how we are expected to set C# commands to access the WCF methods?</p>
  
  <p>The Visual Studio 2017 'Add Connected Service' dialogue with C# was used in a .NET Standard 2.0 Class.</p>
  
  <p><strong>Further detail</strong></p>
  
  <p>In <code>reference.cs</code> file there is</p>
  
  <pre><code>public interface IAvisaWCF
  [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAvisaWCF/DoAccess", ReplyAction="http://tempuri.org/IAvisaWCF/DoAccessResponse")]
      System.Threading.Tasks.Task DoAccessAsync(string INT_IdFisico, int INT_Id, int DI_ID, string DI_IDFisico, char Numero_Leitor, string Mobile_EMEI);
  
  public partial class AvisaWCFClient : System.ServiceModel.ClientBase&lt;AvisaWCFRef.IAvisaWCF&gt;, AvisaWCFRef.IAvisaWCF
  {
  
      public System.Threading.Tasks.Task DoAccessAsync(string INT_IdFisico, int INT_Id, int DI_ID, string DI_IDFisico, char Numero_Leitor, string Mobile_EMEI)
      {
          return base.Channel.DoAccessAsync(INT_IdFisico, INT_Id, DI_ID, DI_IDFisico, Numero_Leitor, Mobile_EMEI);
      }
  </code></pre>
  
  <p>In the Net Standard Class (stantiated in a Android Class) I had instantiated the component and Called de Async Method,  like this;</p>
  
  <pre><code>    AvisaWCFRef.AvisaWCFClient oComp = new AvisaWCFRef.AvisaWCFClient();
  
  oComp.DoAccessAsync(Int_IdFisico, Int_Id, DI_ID, DI_IdFisico, Numero_Leitor, Mobile_EMEI);
  </code></pre>
  
  <p>The system then gave me the following error:</p>
  
  <blockquote>
    <p>Unhandled Exception:</p>
    
    <p>System.ServiceModel.FaultException`1 [[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version = 2.0.5.0,
    Culture = neutral, PublicKeyToken = 31bf3856ad364e35]]:
    An error occurred during deserialization of the request message body for the DoAccess operation.
    The OperationFormatter encountered an invalid message body.
    It was hoped to find 'Element' node with name 'DoAccess' and namespace '<a href="http://tempuri.org/" rel="nofollow noreferrer">http://tempuri.org/</a>'.
    Found element node with name 'DoAccessAsync' and namespace '<a href="http://tempuri.org/" rel="nofollow noreferrer">http://tempuri.org/</a>' occurred</p>
  </blockquote>
  
  <p>Could someone exemplify how I'm supposed to set C# commands to access the WCF methods?</p>