2013年11月8日
摘要: /// /// 防止开发重定向,篡改returnurl/// /// /// /// private static bool IsLocalUrl(string url){ if (string.IsNullOrEmpty(url)) { return false; } Uri absoluteUri; if (Uri.TryCreate(url, UriKind.Absolute, out absoluteUri)) { return String.Equals(HttpCont... 阅读全文
posted @ 2013-11-08 11:42 aweifly 阅读(363) 评论(0) 推荐(0) 编辑
摘要: HttpCookie cookie;cookie = FormsAuthentication.GetAuthCookie(W3Account, isRemberMe);if (isRemberMe){ cookie.Expires = System.DateTime.Now.AddDays(1);}HttpContext.Current.Response.Cookies.Add(cookie);string targetUrl;targetUrl = FormsAuthentication.GetRedirectUrl(W3Account, isRemberMe);HttpCont... 阅读全文
posted @ 2013-11-08 11:40 aweifly 阅读(460) 评论(0) 推荐(0) 编辑