This post was most recently updated on September 30th, 2022.
2 min read.This post describes how to fix Windows Authentication on a SharePoint server that is failing on other local addresses other than localhost.
Symptoms
You get the standard Windows/Basic Authentication prompt when accessing your SharePoint site, but the site won’t accept your credentials when you are accessing the site using an address like http://website. However, using an address like http://localhost works fine (but of course may cause other problems).
You also get event log entries like this (most likely in System -category):
The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME.
Cause: IIS won’t accept Windows Authentication for a local host name
Even though you have an entry in the host’s file for the address, you have correctly created SharePoint AAM, and even have the correct Site Bindings in IIS, it appears IIS isn’t necessarily willing to authenticate you using a host header that isn’t found from the DNS – but rather, is local.
Solution
This might be a possible workaround, and I wouldn’t necessarily do this in production (at least you should have your DNS set up correctly in production!), but you can bypass this little security feature by making the following registry change:
Time needed: 5 minutes
How to fix “The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME” error
- Fire up your Registry Editor
Go to REGEDIT and open the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
- Right click MSV1_0 –> New -> Multi-String Value
- Type BackConnectionHostNames and click Enter.
- Right-click on the newly created value and select Modify.
Enter the hostname of the site: WEBSITENAME (and on a new line enter the FQDN, WEBSITENAME.domain.com)
- Restart IIS
- You should be good!
For us the registry entry looked something like this:
Editing the BackConnectionHostNames in the Registry Editor to enable access to SharePoint
Authentication should work now!
Did it work for you? Let me know in the comments section below.
- “Performing cleanup” – Excel is stuck with an old, conflicted file and will never recover. - November 12, 2024
- How to add multiple app URIs for your Entra app registration? - November 5, 2024
- How to access Environment Secrets with GitHub Actions? - October 29, 2024