We installed SharePoint 2010 on a Windows Server 2008 R2 server with IIS 7. A new web application was created and set to use NTLM authentication. When browsing to this web application using the local hostname, authentication was successful, and the web site displayed as normal. But due to multiple web sites that will be used on this web server, we wanted to use a different host name for this particular web site.
For example: Hostname = MOSSSERVER; website hostname = WEBSITENAME.
WEBSITENAME was added to the Internal DNS server and the local hosts file, and we attempted to browse to http://WEBSITENAME, but the web site would not authenticate using that hostname. The following event appeared in Windows Event Viewer:
Source: LsaSrv
Event ID: 6037The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME. The target name used is not valid. A target name should refer to one of the local computer names, for example, the DNS host name.
Try a different target name.
No problem. So http://WEBSITENAME was added to the Alternate Access Methods in SharePoint 2010 for this web application. Still the same error occurred, yet authentication was successful if the http://MOSSSERVER URL was used.
After much investigation, we managed to find that a valid target name needs to be specified. This can be done by performing the following:
1. Go to REGEDIT > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
2. Right click MSV1_0 > New > Multi-String Value
3. Type ‘BackConnectionHostNames’
4. Right click & select ‘Modify’
5. Enter the Hostname of the site: WEBSITENAME (and on a new line enter the FQDN, WEBSITENAME.domain.com as well)
6. Restart IIS
Source: mosscentral.blogspot.com
Hi,
While troubleshooting OCS issue I came accross similar event and we fixed it by adding one more SPN with OCSPoolname to target machine.
We were getting exact same warning for this OCS Frontend server. In our case we are using this machine to authenticate using kerberos spn, here you are trying to use http/websitename
you can try adding same spn to this computer which should resolve this issue instead of adding registry fix.
setspn -a http/websitename Servername
Reboot the machine.
Thank you.
Regards,
–
S a r v e s h
Hello,
Great thanks – worked. I fought with this a lot!
S a r v e s h, I also tried what you suggested, but it didn’t work. Do you have any suggestions and/or a thorough guide on how to do these configurations?! Here is what i get from the command setspn -l “myservername”:
http://img528.imageshack.us/img528/4255/setspnlist.png
In addition to the http entry I added a dns entry, like what I have for my .. But adding the dns entry was stupid, since I am actually using an artificial domain, with an entry in the hosts(lmhosts) file that points to my local ip. I have a all-in-one sharepoint box setup, with the Dns server role installed, but i do not use any additional dns configuration(just that what what is done indirectly – either by the sharepoint configuration wizards or other – I can’t remember) Anyway, clarification will be welcome!
Hi, also you can try this: http://support.microsoft.com/kb/896861
It disables this feature, without specify any name.
Cheers.
Its very useful. Thanks a lot.
I take pleasure in, cause I discovered just what I was having a look for. You’ve ended my four day lengthy hunt! God Bless you man. Have a great day. Bye
I installed SharePoint 2013 and received the http 401 error after creating aweb application and this solution you proposed helped a lot Your the man!!