Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (System.Web.HttpContext.Current.Items["TokenLogin"] == null)
- {
- var httpCookie = Request.Cookies["PermitidoUtilizarSistemaLog"];
- if (httpCookie != null && ConfigurationManager.AppSettings["tokenPedidoWeb"].Equals(httpCookie.Value))
- {
- System.Web.HttpContext.Current.Items.Add("TokenLogin", httpCookie.Value);
- httpCookie.Expires = DateTime.Now;
- }
- }
- else
- {
- if (!System.Web.HttpContext.Current.Items["TokenLogin"].Equals(ConfigurationManager.AppSettings["tokenPedidoWeb"]))
- return Redirect("acesso");
- }
Add Comment
Please, Sign In to add comment