Export (0) Print
Expand All

Edit .NET Globalization Settings (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

You can change globalization settings for ASP.NET applications at the Web server level when you want them to apply to all ASP.NET applications on the server. IIS lets you change the following globalization settings:

  • Culture settings, for example, the UI language

  • Encoding settings, for example, encoding for response headers

You can also edit ASP.NET globalization settings for sites, applications, directories, and files.

noteNote
Editing a configuration setting changes the setting at the local level and for any child levels that inherit the setting.

For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see NET Globalization Settings Feature Requirements (IIS 7).

Exceptions to feature requirements

  • None

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.

  1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).

  2. In Features View, double-click .NET Globalization.

  3. On the .NET Globalization page, in the property sheet, click to select the global setting you want to edit, and select a value from the drop-down list.

  4. In the Actions pane, click Apply.

To edit the default culture for processing Web requests, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /culture: string

The variable string is the default culture to be used for processing Web requests. For example, to change the default culture for processing Web requests to US English, type the following at the command prompt, and then press Enter:

appcmd set config /commit:WEBROOT /section:globalization /culture:en-us

noteNote
When you use Appcmd.exe to configure the <globalization> element at the global level in IIS 7, you must specify /commit:WEBROOT in the command so that configuration changes are made to the root Web.config file instead of ApplicationHost.config.

To enable or disable client-based culture, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /enableClientBasedCulture:True|False

The variable enableClientBasedCulture:True enables client-based culture and the variable enableClientBasedCulture:False disables client-based culture. The default is False.

To edit the default culture for processing locale-dependent resource searches, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /uiCulture: string

The variable string is the default culture to be used for processing locale-dependent resource searches.

To change the default encoding when parsing .aspx, .asmx, and .asax files, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /fileEncoding: string

The variable string is the default encoding to be used when parsing .aspx, .asmx, and .asax files.

To edit the assumed encoding of each incoming request, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /requestEncoding: string

The variable string is the assumed encoding of each incoming request. The default is utf-8.

To change the header encoding for responses, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /responseHeaderEncoding: string

The variable string is the header encoding used for responses. The default is utf-8.

To edit the content encoding for responses, use the following syntax:

Appcmd set config /commit:WEBROOT /section:globalization /responseEncoding: string

The variable string is the content encoding used for responses. The default is utf-8.

For more information about Appcmd.exe, see Appcmd.exe (IIS 7).

The procedure in this topic affects the following configuration elements:

<globalization>

For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.

Use the following WMI classes, methods, or properties to perform this procedure:

  • GlobalizationSection class

For more information about WMI and IIS, see Windows Management Instrumentation (WMI) in IIS 7. For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft