日期:2014-05-18 浏览次数:20605 次
public static void Initialize()
{
if (!_Initialized)
{
lock (_lockObject)
{
if (!_Initialized)
{
AuthenticationSection authentication = RuntimeConfig.GetAppConfig().Authentication;
authentication.ValidateAuthenticationMode();
_FormsName = authentication.Forms.Name;
_RequireSSL = authentication.Forms.RequireSSL;
_SlidingExpiration = authentication.Forms.SlidingExpiration;
if (_FormsName == null)
{
_FormsName = ".ASPXAUTH";
}
_Protection = authentication.Forms.Protection;
_Timeout = (int) authentication.Forms.Timeout.TotalMinutes;
_FormsCookiePath = authentication.Forms.Path;
_LoginUrl = authentication.Forms.LoginUrl;
if (_LoginUrl == null)
{
_LoginUrl = "login.aspx";
}
_DefaultUrl = authentication.Forms.DefaultUrl;
if (_DefaultUrl == null)
{
_DefaultUrl = "default.aspx";
}
_CookieMode = authentication.Forms.Cookieless;
_CookieDomain = authentication.Forms.Domain;
_EnableCrossAppRedirects = authentication.Forms.EnableCrossAppRedirects;
_TicketCompatibilityMode = authentication.Forms.TicketCompatibilityMode;[code=C#]