System.Threading.ThreadAbortException: The thread was being aborted. When consuming webservice operation

2

I have the following code:

proxy_hom_recepcionarLoteRps.RecepcionarLoteRPS proxy = new 
proxy_hom_recepcionarLoteRps.RecepcionarLoteRPS();

proxy.Url = url + "/arecepcionarloterps";

string resp = proxy.Execute(CABECALHO, xmlEnvio);

Execute is a method imported from a WSDL:

public partial class RecepcionarLoteRPS : 
System.Web.Services.Protocols.SoapHttpClientProtocol
{

    /// <remarks/>
    public RecepcionarLoteRPS()
    {
        this.Url = "http://nfsev-prd.manaus.am.gov.br/nfsev/servlet/arecepcionarloterps";
    }

    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.e-nfs.com.braction/ARECEPCIONARLOTERPS.Execute", RequestElementName="RecepcionarLoteRPS.Execute", RequestNamespace="http://www.e-nfs.com.br", ResponseElementName="RecepcionarLoteRPS.ExecuteResponse", ResponseNamespace="http://www.e-nfs.com.br", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("Outputxml")]
    public string Execute(string Nfsecabecmsg, string Nfsedadosmsg)
    {
        object[] results = this.Invoke("Execute", new object[] {
                    Nfsecabecmsg,
                    Nfsedadosmsg});
        return ((string)(results[0]));
    }

The Execute calls a web service request operation, but sometimes it returns the exception:

  

System.Threading.ThreadAbortException: The thread was being aborted.      at System.RuntimeMethodHandle._InvokeMethodFast (Object target, Object [] arguments, SignatureStruct & sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)      at System.RuntimeMethodHandle.InvokeMethodFast (Object target, Object [] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)      at System.Reflection.RuntimeMethodInfo.Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object [] parameters, CultureInfo culture, Boolean skipVisibilityChecks)      at System.Reflection.RuntimeMethodInfo.Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object [] parameters, CultureInfo culture)      in System.RuntimeType.InvokeMember (String name, BindingFlags bindingFlags, Binder binder, Object target, Object [] providedArgs, ParameterModifier [] modifiers, CultureInfo culture, String [] namedParams)      in System.Type.InvokeMember (String name, BindingFlags invokeAttr, Binder binder, Object target, Object [] args)      in nfsews.LinxEnviarLoteRpsImpl.executa (String sending)      in nfsews.IntegradorNFSe.LinxEnviarLoteRps (String sending)

Would anyone know how to treat me?

    
asked by anonymous 05.04.2018 / 16:59

0 answers