I have been working with SharePoint for a few months now in all sorts of different configurations:
- Domain connected server with Active Directory Authentication (AD)
- Domain connected server with Forms Based Authentication (FBA)
- Workgroup connected server with Active Directory Authentication (AD)
- Workgroup connected server with Forms Based Authentication (FBA)
Most of the experimentation was going well into I was deploying a custom webpart. The webpart was working fine when the server was accessed via the machine name URL: http://MACHINENAME. However when I setup an Alternate Access Mapping (AAM), nothing worked.
Finally I stumble across a great article that was referred to me by one of our developers about a nice registry key called "BackConnectionHostNames"
I am going to repeat the steps below incase the link is broken but this is what finally made AAM work in my configuration.
There are two possible methods for a server application to work around this change. The recommended approach is to map the host name used in the request URL to the BackConnectionHostNames key in the registry on the server. The BackConnectionHostNames registry key is normally used to map a host name to a loopback address. To specify the host names that are mapped to the loopback address and can connect to Web sites on a local computer, 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 MSV1_0, point to New, and then click Multi-String Value.
4. Type BackConnectionHostNames, and then press ENTER.
5. Right-click BackConnectionHostNames, and then click Modify.
6. In the Value data box, type the host name or the host names for the sites (the host name used in the request URL) that are on the local computer, and then click OK. In our case it would be www.test.com.
7. Quit Registry Editor, and then restart the IISAdmin service and run IISReset.
A less secure work around is to disable the loop back check, as described in this article. This disables the protection against reflection attacks. So it is better to constrain the set of alternate names to only those you expect the machine to actually use.
This article was reposted from the IIS Team Blog from original poster Amit Sharma
NOTE: To create a simple Test Web-Site running on some different port. Also add a hostname to the site as www.test.com and add an entry for it in your Host file (located at C:\Windows\System32\drivers\etc). Add a simple asp page in this Test Web Site which displays the current time. This is great if you need to run a demo machine off network that requires a webserver.