IIS6: User Interface Does Not Permit Unicode Characters in Host Header Names (332052)



The information in this article applies to:

  • Microsoft Internet Information Services
  • the operating system: Microsoft Windows Server 2003
  • Microsoft Internet Information Services version 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 "Configuration Backup/Restore" 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, ".", and "-"
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:
    1. In the ISM, right-click the Web site, and then click Properties.
    2. On the Web Site tab, click Advanced.
    3. Under Multiple Identities for this Web site, click Add.
    4. Type the IP address, TCP port, and a host header value with Unicode characters.
    5. Click OK on each screen to close all dialog boxes.
    6. In Windows Explorer, right-click \System32\Inetsrv\Metabase.xml, and then click Edit to open the file in Notepad.
    7. Click Edit, click Find, type the name that you used as a host header value in step 4, and then click Find Next
    8. Edit the host header to add the Unicode characters. Exit Notepad and save the changes.
  • Create the host header by using the Adsuil.vbs command line script. In this example, you set a host header name of "www.@mysite.com" on the default Web site:
    1. Click Start, click Run, and then type cmd.
    2. At the command prompt, type the following, and then press ENTER:

      cd c:\inetpub\adminscripts

    3. Type the following, and then press ENTER:

      adsutil Set W3SVC/1/ServerBindings ":80:" ":80:www.@mysite.com"

  • Create the host header directly in the metabase:
    1. In Windows Explorer, right-click \System32\Inetsrv\Metabase.xml, and then click Edit to open the file in Notepad.
    2. 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:
                  </IIsWebService> 
                  <IIsWebServer Location="/LM/W3SVC/1"
                  AppPoolId="DefaultAppPool"
                  DefaultDoc="Default.htm,Default.asp,index.htm,iisstart.htm,Default.aspx"
                  LogPluginClsid="{FF160663-DE82-11CF-BC0A-00AA006111E0}"
                  ServerBindings=":80: "
                  ServerComment="Default Web Site"
      				
    3. If you want to add a host header name of "www.@mysite.com", edit Metabase.xml to look similar to this:
                  </IIsWebService> 
                  <IIsWebServer Location="/LM/W3SVC/1"
                  AppPoolId="DefaultAppPool"
                  DefaultDoc="Default.htm,Default.asp,index.htm,iisstart.htm,Default.aspx"
                  LogPluginClsid="{FF160663-DE82-11CF-BC0A-00AA006111E0}"
                  ServerBindings=":80:
                  :80:www.@mysite.com"
                  ServerComment="Default Web Site"
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 "Symptoms" section.

REFERENCES

For additional information about using host headers, click the following article number to view the article in the Microsoft Knowledge Base:

324287 HOW TO: Use Host Header Names to Configure Multiple Web Sites in Internet Information Services 6.0


Modification Type:MajorLast Reviewed:4/30/2003
Keywords:kbpending kbprb KB332052