You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
590 B

  1. <%@ Application Language="C#" %>
  2. <script RunAt="server">
  3. public override string GetVaryByCustomString(HttpContext context, string arg)
  4. {
  5. if (arg == "authenticated")
  6. {
  7. HttpCookie cookie = context.Request.Cookies[FormsAuthentication.FormsCookieName];
  8. if (cookie != null)
  9. return cookie.Value;
  10. }
  11. return base.GetVaryByCustomString(context, arg);
  12. }
  13. public void Application_BeginRequest(object sender, EventArgs e)
  14. {
  15. Context.Items["IIS_WasUrlRewritten"] = "false";
  16. }
  17. </script>