如何在表单身份验证asp.net正常工作的情况下获得enableCrossAppRedirects?
有人见过这片土地吗?实际上,我正在尝试为不同域中的2个asp.net网站实现单点登录。正在查找此的示例代码? 非常感谢 如果您正在使用跨域身份验证,您需要确保您也使用了无cookie身份验证,因为cookie不会跨域 有一个很好的代码示例,来自另一个作者如何在表单身份验证asp.net正常工作的情况下获得enableCrossAppRedirects?,asp.net,c#-3.0,single-sign-on,Asp.net,C# 3.0,Single Sign On,有人见过这片土地吗?实际上,我正在尝试为不同域中的2个asp.net网站实现单点登录。正在查找此的示例代码? 非常感谢 如果您正在使用跨域身份验证,您需要确保您也使用了无cookie身份验证,因为cookie不会跨域 有一个很好的代码示例,来自另一个作者 if (FormsAuthentication.EnableCrossAppRedirects) { text = context.Request.QueryString[name]; if (text != null && t
if (FormsAuthentication.EnableCrossAppRedirects)
{
text = context.Request.QueryString[name];
if (text != null && text.Length > 1)
{
if (!cookielessTicket && FormsAuthentication.CookieMode == HttpCookieMode.AutoDetect)
{
cookielessTicket = CookielessHelperClass.UseCookieless(context, true, FormsAuthentication.CookieMode);
}
try
{
formsAuthenticationTicket = FormsAuthentication.Decrypt(text);
}
catch
{
flag2 = true;
}
if (formsAuthenticationTicket == null)
{
flag2 = true;
}
}
if (formsAuthenticationTicket == null || formsAuthenticationTicket.Expired)
{
text = context.Request.Form[name];
if (text != null && text.Length > 1)
{
if (!cookielessTicket && FormsAuthentication.CookieMode == HttpCookieMode.AutoDetect)
{
cookielessTicket = CookielessHelperClass.UseCookieless(context, true, FormsAuthentication.CookieMode);
}
try
{
formsAuthenticationTicket = FormsAuthentication.Decrypt(text);
}
catch
{
flag2 = true;
}
if (formsAuthenticationTicket == null)
{
flag2 = true;
}
}
}
}