Monday, January 24, 2011

DisableLoopbackCheck - 401 Unauthorized / Repeated Login Prompts and Resulted Blank Page - Host Header Issue

Problem: Couldn't Access a local SharePoint site from the server! 

Today, I setup my new SharePoint 2010 development box. I made the machine as domain controller: "". Machine name was: SharePoint. After I installed SharePoint in port 80 I was accessing the SharePoint site at URL: http://sharepoint. Then I wanted to access the SharePoint as: So I created a Host record in DNS.

Once I get the URL in the browser, it was asking me the password again and again. Finally it gave the 401 unauthorized error. (In an another case, SharePoint prompted for login credentials for three times and gave blank page!) hmm.. what's wrong with SharePoint?

Also found, SharePoint sites are not opening when you login to SharePoint server(WFE, typically) but opening elsewhere!

Here the problem was: we need to disable the LoopBackCheck. Here is what I did.

To set the DisableLoopbackCheck registry key, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart IIS.

DisableLoopbackCheck with PowerShell
Why not PowerShell? Lets use PowerShell to Disable Loopback Check, so that it can be faster. Fire PowerShell console and enter:
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword​
Or the secured way:
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters' -Name DisableStrictNameChecking -Value 1 -PropertyType "DWord"
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0' -Name BackConnectionHostNames -PropertyType MultiString
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0' -Name BackConnectionHostNames -Value ""

This fix applies for Host headers with Local SharePoint instances. In an another case, this was due to browser setting: "Enable Integrated Windows Authentication"

BTW, If your account has been locked out in AD or you supplied wrong User ID/Password, Your Password Expired or your Account is locked out, You will face the similar issue!

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...