Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public bool IsAuthenticated()
  2. {
  3. if (Session != null && Session["UserRole"] != null)
  4. {
  5. return true;
  6. }
  7. return false;
  8. }
  9.  
  10. public ActionsResult Index() {
  11. if(!login.IsAuthenticated()){
  12. return RedirectToAction("Index","Login");
  13. }
  14. return View();
  15. }
  16.  
  17. public ActionsResult Index() {
  18. if (Session == null && Session["UserRole"] == null)
  19. {
  20. return RedirectToAction("Index","Login");
  21. }
  22. return View();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement