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();

            }

        }

    }

  • 相关阅读:
    HTML的<head>中的内容总结
    毕业设计
    win7中protel99添加元件库
    E题
    D 题
    C 题 KMP中next[]问题
    B题 Sort the Array
    A题
    CSU1350 To Add which?
    CodeForce 448C 木片填涂问题
  • 原文地址:https://www.cnblogs.com/chenfulai/p/2816592.html
Copyright © 2011-2022 走看看