GlobalizationSection Class

Configures the globalization settings for a Web application.

Syntax

class GlobalizationSection : ConfigurationSection  

Methods

The following table lists the methods exposed by the GlobalizationSection class.

Name Description
GetAllowDefinition (Inherited from ConfigurationSection.)
GetAllowLocation (Inherited from ConfigurationSection.)
RevertToParent (Inherited from ConfigurationSection.)
SetAllowDefinition (Inherited from ConfigurationSection.)
SetAllowLocation (Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the GlobalizationSection class.

Name Description
Culture An optional read/write string value that specifies the default culture for processing incoming Web requests. For valid culture strings, see the System.Globalization.CultureInfo class. You can also set this property to "auto". Note: This property is new in the .NET Framework 2.0.
EnableBestFitResponseEncoding An optional read/write boolean value. true if the best-fit character encoding for a response is enabled; otherwise, false. The default is false. Note: This property is new in the .NET Framework 2.0.
EnableClientBasedCulture An optional read/write boolean value. true if the Culture and UICulture properties should be based on the AcceptLanguage header field value that is sent by the client browser; otherwise, false. The default is false.

The AcceptLanguage header specifies the language that a given browser prefers. Note: This property is new in the .NET Framework 2.0.
FileEncoding An optional read/write string value that specifies the default encoding for .aspx, .asmx, and .asax file parsing. Unicode and UTF-8 files that are saved with the byte order mark prefix are automatically recognized, regardless of the value of this property. Note: This property is new in the .NET Framework 2.0.
Location (Inherited from ConfigurationSection.) A key property.
Path (Inherited from ConfigurationSection.) A key property.
RequestEncoding An optional read/write string value that specifies the assumed encoding of each incoming request, including posted data and the query string. The default is "UTF-8".

If the request includes a request header that contains an Accept-Charset attribute, it overrides this property value in the configuration. Note: The default encoding is specified in the globalization section of the Machine.config file that was created when the .NET Framework was installed. If response encoding is not specified in a Machine.config or Web.config file, encoding is set to the default Regional Options locale for the computer. This property is new in the .NET Framework 2.0.
ResourceProviderFactoryType An optional read/write string value that specifies the factory type of the resource provider.
ResponseEncoding An optional read/write string value that specifies the content encoding of responses. The default is "UTF-8". Note: The default encoding is specified in the globalization section of the Machine.config file that was created when the .NET Framework was installed. If response encoding is not specified in a Machine.config or Web.config file, encoding is set to the default Regional Options locale for the computer. This property is new in the .NET Framework 2.0.
ResponseHeaderEncoding An optional read/write string value that specifies the header encoding of HTTP responses. The default is "UTF-8". Note: This property is new in the .NET Framework 2.0.
SectionInformation (Inherited from ConfigurationSection.)
UICulture An optional read/write string value that specifies the default culture for processing locale-dependent resource searches. For valid culture strings, see the System.Globalization.CultureInfo class. You can also set this property to "auto". Note: This property is new in the .NET Framework 2.0.

Subclasses

This class contains no subclasses.

Inheritance Hierarchy

ConfigurationSection

GlobalizationSection

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

System.Globalization.CultureInfo Class
ConfigurationSection Class
globalization Element (ASP.NET Settings Schema)
System.Web.Configuration.GlobalizationSection Properties