When you use Visual Studio 2005 (this problem also exists in Visual Studio 2008) to debug a website with host headers, the following error message is displayed:
---------
Microsoft Visual Studio
---------
Debugging cannot be started on the Web server. An authentication error occurs when you communicate with the Web server. See "help" to help solve the problem.
---------
Set project URL to http://www.msdi.cn/MultiWeb in the web of Project Properties
If "project URL" is specified as localhost, the above errors will not occur during the configuration, so most of the errors on the Internet are excluded.ArticleProvides the "Integrated Windows Authentication" solution to "enable debugging" in project properties.
The real solution is as follows:
Step 1: Disable loop check
Follow these steps:
1. Open the Registry Editor (Click Start, click Run, type regedit, and then click OK ).
2. In Registry Editor, find and click the following registry key:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA
3. Right-click LSA, point to new, and click DWORD Value.
4. Type disableloopbackcheck and press Enter.
5. Right-click disableloopbackcheck and click Modify.
6. In the value data box, type 1 and click OK.
7. Exit Registry Editor and restart the computer. (Do not restart the computer)
Step 2: Specify the Host Name
To specify a host name, map it to the loopback address and connect it to the web site, follow these steps:
1. Open the Registry Editor (Click Start, click Run, type regedit, and then click OK ). .
2. In Registry Editor, find and click the following registry key:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA \ msv1_0
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 click Modify.
6. In the value data box, type the host name or host name as the name of the local computer where the site is located, and then click OK.
7. Exit the Registry Editor and restart the IISADMIN service.
This error message appears only on computers in a specific environment: this issue only appears on web sites configured with a Host header on machines with IIS 6 or IIS 5.1 and the RTM version of. net Framework 3.5 SP1.