zoukankan      html  css  js  c++  java
  • sharepoint session form timeout

    When using FBA, session timeout is determined in the web.config. This is a standard feature of asp.net.

    Example:
    <forms loginUrl="/_layouts/login.aspx" timeout="30" />
    (timeout is in minutes).


    Setting the timeout in Central Admin will have no effect on Forms authenticated sites.

    or

    public class CheckSessionModule: IHttpModule

    {

        public void Init(HttpApplication app)

        {

            ctx.Application.AcquireRequestState += this.OnAcquireRequestState;

        }

        public void Dispose() {}

        public void OnAcquireRequestState(Object sender, EventArgs args)

        {

            if ((HttpContext.Current.User.Identity.IsAuthenticated == true) && (HttpContext.Current.Session.IsNewSession == true))

            {

                FormsAuthentication.SignOut();

                HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Url.ToString(), false);

                HttpContext.Current.ApplicationInstance.CompleteRequest();

            }

        }

    }

  • 相关阅读:
    Spring Boot第四弹,一文教你如何无感知切换日志框架?
    Spring Boot 第三弹,一文带你了解日志如何配置?
    UVa 1625
    UVa 11584
    UVa 11400
    UVa 12563
    UVa 116
    UVa 1347
    UVa 437
    UVa 1025
  • 原文地址:https://www.cnblogs.com/chenfulai/p/2816592.html
Copyright © 2011-2022 走看看