Why does a call to a SOAP service from a WebAPi throw an error?

0

I am trying to make a call to a SOAP web service from a method in a WebAPI. This throws me this error:

An asynchronous module or handler completed while an asynchronous operation was still
pending

But I'm not calling the SOAP service with async methods

What could be causing this error?

Call code

     using IS3 = Siscore3.WebAPI.identificativosServicio3;

     public class PersonaRepository : IDisposable
    {
     public SPersona ConsultarIdentificativos(int idUsuario, string numeroCliente)
    {           
        try
        {
            IS3.ServiceSoapClient consulta = new IS3.ServiceSoapClient();
            IS3.Cliente[] clientes = consulta.ConsultaClientexId(numeroCliente);

           //Aqui hay mas codigo....

            catch (Exception ex)
            {
              //Codigo de control de errores....
            }

    }
}

WebApi Method:

    private PersonaRepository personaContexto = new PersonaRepository();

    [Route("api/Cliente/Buscar/{numeroCliente}")]
    [HttpPost]
    public SPersona ConsultarIdentificativos(string numeroCliente)
    {
        SPersona persona = personaContexto.ConsultarIdentificativos(1,  numeroCliente);
        return persona;
    }

I unchecked the checkbox to create asynchronous operations:

    
asked by Jorge González 22.06.2017 в 17:41
source

0 answers