<iriParsing> Element (Uri Settings)

Specifies if International Resource Identifier (IRI) parsing is applied to a Uri and whether IRI parsing rules should be applied.




Attributes and Elements

The following sections describe attributes, child elements, and parent elements.


Element Description
enabled Specifies whether IRI parsing is enabled. The default value is false.

Child Elements


Parent Elements

Element Description
uri Contains settings that specify how the .NET Framework handles web addresses expressed using uniform resource identifiers (URIs).


The existing Uri class has been extended in .NET Framework 3.5. 3.0 SP1, and 2.0 SP1 to provide support for International Resource Identifiers (IRI) and Internationalized Domain Names (IDN). Current users will not see any change from the .NET Framework 2.0 behavior unless they specifically enable IRI and IDN support. This ensures application compatibility with prior versions of the .NET Framework.

To enable support for IRI, the following two changes are required:

  1. Add the following line to the machine.config file under the .NET Framework 2.0 directory

    <section name="uri" type="System.Configuration.UriSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />  
  2. Specify whether IRI parsing rules should be applied. This can be done in the machine.config or in the app.config file.

Enabling IRI parsing (iriParsing enabled = true) will do normalization and character checking according to the latest IRI rules in RFC 3987. The default value is false and will do normalization and character checking according to RFC 2396 and RFC 3986 (for IPv6 literals).

Configuration Files

This element can be used in the application configuration file or the machine configuration file (Machine.config).



The following example shows a configuration used by the Uri class to support IRI parsing and IDN names.


    <idn enabled="All" />  
    <iriParsing enabled="true" />  

See also