Bugra Postaci's Blog

All my posts are provided "AS IS" with no warranties, and confer no rights.

  • Home
  • About
  • Docs
  • Privacy
Posts Comments
  • Sharepoint
    • Sharepoint 2010
    • SharePoint 2013
    • Sharepoint Tips & Tricks
    • SharePoint 2016
    • Sharepoint Tools
  • ASP.NET
  • C#
    • Tips & Tricks
  • Uncategorized

Sharepoint 2010 complete sign out

27/04/2011 Leave a comment

When you using Windows Authentication  (NTLM + AD) with your sharepoint site you may want to enter credential after  you sign out from your site.But it is not easy and somehow imposible when using authentication NTLM and IE .Beacuse after you sign out and try to login again ,automatic login proccess logs you in immediately.

I can explain you two alternative way two prevent automatic log on.

First solution which is my suggested way. Dont use windows authentication . Use Claim Based Authentication (CBA)+ (Forms Based Authentication) FBA  with Active Directory (AD) membership.

http://blogs.msdn.com/b/sridhara/archive/2010/01/07/setting-up-fba-claims-in-sharepoint-2010-with-active-directory-membership-provider.aspx

And Second way:

1) Edit your v4.master and add fallowing js codes. (Using JQuery)

<script type="text/javascript" src="/_catalogs/Scripts/jquery.js"></script>
<script type="text/javascript" >
$(document).ready(function(){$("#zz15_ID_Logout").attr("onMenuClick","STSNavigate2(event,'/SitePages/logout.aspx');");});
</script>

//This code added for testing jquery working correctly.

<script type="text/javascript" >
$(document).ready(function(){alert("Jquery is working");});
</script>

2) create a new “logout.aspx” page which masterpage is v4.master using Sharepoint Designer

3) add the fallowing code to your new sign out page

<script type="text/javascript">
function _spBodyOnLoad()
{
try
{
   /* Note : this command is support with only IE  */
  document.execCommand("ClearAuthenticationCache",false);
}
  catch (e) { }
  window.location='/_layouts/signout.aspx'; 
}
</script>

4) For testing choose a different machine than sharepoint server and configure your browser Tools->Internet Options->Security->Local Intranet
Click Custom Level and find Logon and change it to “Prompt for user name and password”
And be sure your site not added to trusted zone sites.

Login your site and type your browser’s addres bar
http://%5BSharepointSiteURL:port%5D/SitePages/logout.aspx and press enter
Try again to login and see asking your credentials.

when your sharepoint site url does not contain dot “.” that IE suppose that its a Local Intranet site. Thats why we changes the Local Intranet Zone settings to “Prompt for user name and password”

If you want to be behave your site an Internet Site by IE

1) First complete solution above and test its working.
2) Set your sites host header url like “www.testsignout.com” in your IIS

  1. Open IIS mmc
  2. Select your Sharepoint Web Application
  3. Click bindings
  4. add your host header

3) Add an alternet access mapping as “www.testsignout.com” from Central Administration site.
4) If you dont want to add a dns record like me append this url to your client machine host file where you want to test your sign out process.

example:
192.168.10.55 http://www.testsingout.com

See default action for IE as Internet zone asking to you your credentials.
Warning : this solution is not compatible for browser except IE.and possible clear your auth cookies with other sites in IE tabs when you surfing in internet. (dame i need to remember my face pass again.)

Resources:
http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/f9021dbf-59e2-4aca-b4fc-3f464b802df9

Filed under Sharepoint 2010 Tagged with automatic login, ClearAuthenticationCache, IE, Jquery, Logoff, NTLM, Sharepoint 2010, Signout, Windows Authentication

Sharepoint 2007 Windows Authentication access denied with Admin Account

26/11/2010 Leave a comment

Symptom:

When you use the fully qualified domain name (FQDN) or a custom host header to browse a local Web site that is hosted on a computer that is running Microsoft Internet Information Services (IIS) 5.1 or a later version, you may receive an error message that resembles the following:

HTTP 401.1 – Unauthorized: Logon Failed

This issue occurs when the Web site uses Integrated Authentication and has a name that is mapped to the local loopback address.

Caused :

After you install security update 957097, applications such as Microsoft SQL Server or IIS may fail when they make local NTLM authentication requests.LoopBack check is one of the security options that are coming with latest windows operating systems. It is enabled by default.

Solutions:

Method 1: Specify host names (Preferred method if NTLM authentication is desired)

To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:

  1. Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  4. Right-click MSV1_0, point to New, and then click Multi-String Value.
  5. Type BackConnectionHostNames, and then press ENTER.
  6. Right-click BackConnectionHostNames, and then click Modify.
  7. In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
  8. Quit Registry Editor, and then restart the IISAdmin service.

Method 2: Disable the loopback check (less-recommended method)

The second method is to disable the loopback check by setting the DisableLoopbackCheckregistry key.

To set the DisableLoopbackCheck registry key, follow these steps:

  1. Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.

Resources :

http://support.microsoft.com/default.aspx?scid=kb;en-us;896861

Filed under Sharepoint Tagged with Access Denied, Account, Admin, DisableLoopbackCheck, Sharepoint 2007, Windows Authentication

RSS Register

  • RSS - Posts
  • RSS - Comments

Search

Inside my brain

2010 2013 AAM Access Denied AD ASP.NET Authentication Backup C# configuration Content Content-type CU Cumulative Database Delete deployment enum Error Excel Feature GAC GC Http HttpHandler IE8 IIS LDAP list Lock() Log meeting Moss 2007 Moss2007 mysite Ninject NTLM Performance PowerShell problem Profile RBS Redirection request Search security server Service Service Pack session Sharepoint Sharepoint 2007 Sharepoint 2010 Sharepoint2010 SharePoint 2013 Site SP1 SP2 SPS2010 SPS2013 SQL stsadm Support Supportability Sync Syncronization TimerJob tools ULS UPA Update user Web Webpart Workflow

Categories

  • .Net Tools (6)
  • ASP.NET (34)
  • C# (32)
  • Coolite (1)
  • Debugging (1)
  • Design Patterns (1)
  • IIS (4)
  • Microsoft Support (1)
  • Powershell (2)
  • Sharepoint (105)
  • Sharepoint 2010 (89)
  • SharePoint 2013 (54)
  • SharePoint 2016 (9)
  • SharePoint 2019 (3)
  • SharePoint Online (5)
  • Sharepoint Tips & Tricks (20)
  • Sharepoint Tools (7)
  • System (2)
  • T-SQL (5)
  • Tips & Tricks (10)
  • Uncategorized (30)
  • Visual Studio IDE (4)
  • Windows 10 (3)

Top Posts

  • Cleaning orphan database from SharePoint Farm
  • How to fix 64bit ACL limit exceeded problem on Sharepoint.
  • The code execution cannot proceed because edgegdi.dll was not found
  • Sharepoint 2010 - Basic Authentication and Php .net web service connection.
  • Multiple file upload and Drag and Drop file feature on Sharepoint 2010
  • Decommisioning Microsoft Sync Framework 1.0 SP1 runtime
  • Can not connect to SharePoint Store via Proxy
  • Unable to open documents using direct links from SharePoint 2019
  • Microsoft.Workflow.Client.AuthenticationException "Authentication Failed"

My Recents

  • The code execution cannot proceed because edgegdi.dll was not found
  • Who is listening on port 80 (http.sys ?)
  • Win10 Search from Start shows a black box
  • Anjular.js fragment identifier “#” hash issue with SharePoint 2019 Modern UI
  • About future of the Content Deployment feature for SharePoint 2019

Archives

  • August 2021 (1)
  • February 2020 (2)
  • November 2019 (2)
  • August 2019 (2)
  • July 2019 (2)
  • June 2019 (1)
  • May 2019 (1)
  • April 2019 (2)
  • March 2019 (2)
  • January 2019 (1)
  • July 2018 (1)
  • June 2018 (1)
  • May 2018 (1)
  • January 2018 (1)
  • December 2017 (1)
  • November 2017 (1)
  • July 2017 (1)
  • June 2017 (3)
  • May 2017 (1)
  • February 2017 (2)
  • May 2016 (1)
  • March 2016 (1)
  • February 2016 (1)
  • December 2015 (1)
  • November 2015 (1)
  • October 2015 (2)
  • August 2015 (3)
  • July 2015 (1)
  • June 2015 (4)
  • May 2015 (2)
  • April 2015 (1)
  • March 2015 (1)
  • February 2015 (3)
  • January 2015 (1)
  • December 2014 (3)
  • October 2014 (3)
  • August 2014 (6)
  • July 2014 (2)
  • May 2014 (5)
  • April 2014 (5)
  • March 2014 (2)
  • February 2014 (17)
  • December 2013 (2)
  • November 2013 (3)
  • October 2013 (5)
  • August 2013 (1)
  • July 2013 (3)
  • June 2013 (4)
  • May 2013 (2)
  • April 2013 (1)
  • March 2013 (3)
  • February 2013 (3)
  • January 2013 (4)
  • December 2012 (1)
  • November 2012 (4)
  • October 2012 (3)
  • September 2012 (2)
  • August 2012 (3)
  • July 2012 (5)
  • June 2012 (2)
  • May 2012 (3)
  • April 2012 (9)
  • March 2012 (7)
  • February 2012 (10)
  • January 2012 (8)
  • December 2011 (8)
  • November 2011 (2)
  • October 2011 (11)
  • September 2011 (10)
  • August 2011 (5)
  • July 2011 (7)
  • June 2011 (13)
  • May 2011 (2)
  • April 2011 (11)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (6)
  • December 2010 (4)
  • November 2010 (4)
  • October 2010 (14)
  • September 2010 (5)
  • August 2010 (3)
  • April 2010 (9)
  • March 2010 (7)
  • February 2010 (10)
  • January 2010 (42)
  • December 2009 (3)
  • November 2009 (9)

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Bugra Postaci's Blog
    • Join 60 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Bugra Postaci's Blog
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...