Problem when referencing WCF web service from MVC app

0

I have a web service hosted on a project created with WFC. The service is published correctly in the WFC test client, from where I can invoke it and give me data in a normal way. It should be noted that the type of data returned by the service is a list of integers

In another solution, I have another project that consumes this web service, for which I have made the following tests, and all give me the same result.

1.- Refresh the service through a Service Reference , after which upon instantiation it gives me the following error message:

  

Message "The default endpoint element referring to the 'ICarroService' contract was not found in the client configuration section of ServiceModel, the reason may be that no configuration file was found for the application or it was not found no end element corresponding to this contract in the client element. " string

2.- After that did not work, in a forum somewhere, I saw that you had to copy from the app.config section <system.serviceModel> , which clearly describes the EndPoint , and I copied it to the web.config of my MVC application that is consuming the service, and even then it does not work, and it gives me the same error message.

3.- I then chose to generate the proxy through the execution of the svcutil command, which generated the proxy and a configuration file, which I copied into the project that consumes the web service , and I installed the class directly in the project, but it still does not work and it gives the same error.

Any ideas you can suggest to review?

  <system.serviceModel>
<services>
  <service name="AvisLatam.Certus.Accuro.SVC.Carro.CarroService">
    <endpoint address="" binding="basicHttpBinding" contract="AvisLatam.Certus.Accuro.SVC.Carro.ICarroService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8733/Design_Time_Addresses/AvisLatam.Certus.Accuro.SVC.Carro/CarroService/" />
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehaviors>
</behaviors>

    
asked by Luis Gabriel Fabres 27.04.2017 в 00:10
source

0 answers