public DocTipoResponse GetTiposDoc(FEAuthRequest feAuthRequest) { AfipWrapperServiceClient client = new AfipWrapperServiceClient(); ClientCredentialHelper.SetCredentials(client.ClientCredentials); try { var t = client.GetTiposDoc(feAuthRequest); client.Close(); return(t); } catch { if (client.State != System.ServiceModel.CommunicationState.Closed) { client.Abort(); } throw; } }