WCF c # invoke it in IONIC

1

I have created a WCF service that if I try it from the WCF test client, its methods work perfectly, the problem is that I would like to use it for example for an IONIC application.

I have no notion if it is possible, for now, I have tried to see their methods using POSTMAN, and I have not had any luck, I always get the 400 error.

I attach part of my code:

Service:

[WebGet]
 public List<Users> UsersList()
 {
    return Logic.LogicFabric.GetLogicUsers().List();
 }

IService:

[OperationContract]
 [WebGet(UriTemplate = "/UsersList/",ResponseFormat = WebMessageFormat.Json, 
  BodyStyle = WebMessageBodyStyle.WrappedRequest)]
  List<Users> UsersList();

Webconfig:

<system.serviceModel>
 <services>
  <service name="JsonPrueba">
    <endpoint address="http://localhost/JsonPrueba/" binding="wsHttpBinding" 
     bindingConfiguration="EnlaceWCF" contract="IService"/>
  </service>
 </services>
 <behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
 </behaviors>
 <bindings>
  <wsHttpBinding>
    <binding name="EnlaceWCF"></binding>

  </wsHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
    multipleSiteBindingsEnabled="true" />

Could you please help me?

Attached I capture how I do it in WCF test client and how I do it in postman

    
asked by Christian Gonzalez 27.10.2017 в 20:04
source

0 answers