예제 #1
0
 public ActionResult LogIn(string usernameOrEmail, string currentPassword)
 {
     using (RentItServiceClient proxy = new RentItServiceClient())
     {
         try
         {
             User user = proxy.Login(usernameOrEmail, currentPassword);
             Session["userId"] = user.Id;
             Session["username"] = user.Username;
         }
         catch (Exception)
         {
         }
     }
     return RedirectToAction("PopularChannels", "Channel", new { userId = Session["userId"] });
 }