SELECT DISTINCT so.name
FROM syscomments sc
INNER JOIN sysobjects so ON sc.id=so.id
WHERE sc.TEXT LIKE '%Products%'
$WebAppName = "http://test:8001"
$account = "Administrator"
$wa = get-SPWebApplication $WebAppName
Set-SPwebApplication $wa –AuthenticationProvider (New-SPAuthenticationProvider)
–Zone Default
protected void OnAuthenticate(object sender, AuthenticateEventArgs e) { e.Authenticated =
SPClaimsUtility.AuthenticateFormsUser(Request.Url, signIn.UserName, signIn.Password); }But for sign out we have to create custom page for logout current user from portal. In all forums you can find information that’s you can use default signout.aspx page from 14 hive. But it’s true if you created custom login page inherited from SharePoint SignInPage. Default page is working incorrectly, it made sign out but doesn’t remove cookies from browser and the next page what you will see after signout, it will ‘Exception … ArgumentException … encodedValue’.
protected override void OnLoad(EventArgs e) { base.OnLoad(e); FormsAuthentication.SignOut(); var authCookie = Request.Cookies[FormsAuthentication.FormsCookieName]; // Clear .ASPAUTH cookie key. if (authCookie != null) { var myCookie = new HttpCookie(authCookie.Name)
{Expires = DateTime.Now.AddDays(-1)}; Response.Cookies.Add(myCookie); } SPIisSettings iisSettingsWithFallback =
Site.WebApplication.GetIisSettingsWithFallback(Site.Zone); if (iisSettingsWithFallback.UseClaimsAuthentication) { FederatedAuthentication.SessionAuthenticationModule.SignOut(); // Clear FedAuth Cookie key FederatedAuthentication.SessionAuthenticationModule.DeleteSession TokenCookie(); } SPUtility.Redirect(Web.ServerRelativeUrl, SPRedirectFlags.Default,
Context); }That’s all what you need to add to the custom sign out page.
<
asp:ContentPlaceHolder
id
=
"PlaceHolderTopNavBar"
runat
=
"server"
Visible
=
"false" /
>
<
asp:ContentPlaceHolder
id
=
"PlaceHolderHorizontalNav"
runat
=
"server"
Visible
=
"false"/>