Microsoft KB Archive/332052

= IIS6: User Interface Does Not Permit Unicode Characters in Host Header Names =

Article ID: 332052

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft Internet Information Server 1.01
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Internet Information Services 6.0

-



This article was previously published under Q332052



SYMPTOMS
Important This article contains information about editing the metabase. Before you edit the metabase, verify that you have a backup copy that you can restore if a problem occurs. For information about how to do this, see the &quot;Configuration Backup/Restore&quot; Help topic in Microsoft Management Console (MMC).

When you enter a Unicode character in the Host Header value section of the Add/Edit Web Site Identification dialog box in Internet Information Services (IIS) 6.0, you may receive the following error message:

Please enter only characters A to Z, a to z, digits, &quot;.&quot;, and &quot;-&quot;

You may also receive the error message if you try to edit an existing host header with Unicode characters.



CAUSE
This problem occurs because the Domain Name System (DNS) standard permits only certain characters.



STATUS
This behavior is by design.



RESOLUTION
Warning If you edit the metabase incorrectly, you can cause serious problems that may require you to reinstall any product that uses the metabase. Microsoft cannot guarantee that problems that result if you incorrectly edit the metabase can be solved. Edit the metabase at your own risk.

Note Always back up the metabase before you edit it.

If you must use Unicode host names on an intranet, enter the host header name directly in the metabase.

Note If you want to make changes to the metabase while IIS is running, you must enable the edit-while-running feature as follows:
 * 1) In the ISM, right-click the server name, and then click Properties.
 * 2) Click to select the Enable Direct Metabase Edit check box, and then click OK.

To enter a host header name in Metabase.xml, use one of the following methods:  Create a host header without Unicode characters and edit the header:  In the ISM, right-click the Web site, and then click Properties. On the Web Site tab, click Advanced. Under Multiple Identities for this Web site, click Add. Type the IP address, TCP port, and a host header value with Unicode characters. Click OK on each screen to close all dialog boxes.</li> In Windows Explorer, right-click \System32\Inetsrv\Metabase.xml, and then click Edit to open the file in Notepad.</li> Click Edit, click Find, type the name that you used as a host header value in step 4, and then click Find Next</li> Edit the host header to add the Unicode characters. Exit Notepad and save the changes.</li></ol> </li> Create the host header by using the Adsuil.vbs command line script. In this example, you set a host header name of &quot;www.@mysite.com&quot; on the default Web site: <ol> Click Start, click Run, and then type cmd .</li> At the command prompt, type the following, and then press ENTER:

cd c:\inetpub\adminscripts

</li> Type the following, and then press ENTER:

adsutil Set W3SVC/1/ServerBindings &quot;:80:&quot; &quot;:80:www.@mysite.com&quot;

</li></ol> </li> Create the host header directly in the metabase: <ol> In Windows Explorer, right-click \System32\Inetsrv\Metabase.xml, and then click Edit to open the file in Notepad.</li>  Click Edit, click Find, and then type the name that you used to identify the site (for example, Default Web Site), and then click Find Next. The section looks similar to the following: <pre class="fixed_text">           </IIsWebService> <IIsWebServer Location=&quot;/LM/W3SVC/1&quot; AppPoolId=&quot;DefaultAppPool&quot; DefaultDoc=&quot;Default.htm,Default.asp,index.htm,iisstart.htm,Default.aspx&quot; LogPluginClsid=&quot;{FF160663-DE82-11CF-BC0A-00AA006111E0}&quot; ServerBindings=&quot;:80: &quot; ServerComment=&quot;Default Web Site&quot; </li>  If you want to add a host header name of &quot;www.@mysite.com&quot;, edit Metabase.xml to look similar to this: <pre class="fixed_text">           </IIsWebService> <IIsWebServer Location=&quot;/LM/W3SVC/1&quot; AppPoolId=&quot;DefaultAppPool&quot; DefaultDoc=&quot;Default.htm,Default.asp,index.htm,iisstart.htm,Default.aspx&quot; LogPluginClsid=&quot;{FF160663-DE82-11CF-BC0A-00AA006111E0}&quot; ServerBindings=&quot;:80: :80:www.@mysite.com&quot; ServerComment=&quot;Default Web Site&quot; </li></ol> </li></ul>

Note After you have entered a Unicode character by using any of these methods, all editing of the host header must be done by editing Metabase.xml, either in Notepad or by using Adsutil.vbs. If you click OK in the user interface, you receive the error message that is described in the &quot;Symptoms&quot; section.

<div class="references_section">