// GET: Project public ActionResult Index() { try { var data = pCl.ReadAll(); pCl.Close(); return(View(data)); } catch (Exception) { pCl.Abort(); return(View("NoResponseFromServer")); //return new HttpStatusCodeResult(404, "Item Not Found"); } }
public static void CloseAllConnection() { if (serviceClient != null) { serviceClient.Close(); serviceClient = null; } if (serviceHost != null) { serviceHost.Close(); serviceHost = null; } }