public FEXResponseAuthorize AutorizarComprobanteExportacion(ClsFEXAuthRequest fexAuthRequest, ClsFEXRequest fexRequest) { AfipWrapperServiceClient client = new AfipWrapperServiceClient(); ClientCredentialHelper.SetCredentials(client.ClientCredentials); try { var t = client.AutorizarComprobanteExportacion(fexAuthRequest, fexRequest); client.Close(); return(t); } catch { if (client.State != System.ServiceModel.CommunicationState.Closed) { client.Abort(); } throw; } }