Kooboo View - Security.Deny_Anonymous

I'm starting to look at adding some sort of secure section. Since I'd want a simple way to include the security at the page level, I figured that a simple View would be easy to add, and easy to maintain.
Language:
C#
Keywords:
Kooboo
Code Snippet

@{

if (!User.Identity.IsAuthenticated)

{

  var ResponseUrl = String.Format("/Account/LogOn?ReturnUrl={0}", Server.UrlEncode(Request.AppRelativeCurrentExecutionFilePath));

  Response.Redirect(ResponseUrl);

}

}


Created 2012-02-01
comments powered by Disqus
Login