SharePoint Authentication prompt

Windows Authentication fails on SharePoint for all hostnames (other than localhost)

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

  1. Fire up your Registry Editor

    Go to REGEDIT and open the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

  2. Right click MSV1_0 –> New -> Multi-String Value

  3. Type BackConnectionHostNames and click Enter.

  4. 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)

  5. Restart IIS

  6. 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
    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.

mm
4.5 2 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
most voted
newest oldest
Inline Feedbacks
View all comments