Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:52:27+00:00 2026-05-28T20:52:27+00:00

I’m trying to enable the IDN/IRI support for the URI class, because I need

  • 0

I’m trying to enable the IDN/IRI support for the URI class, because I need the “Uri.IsWellFormedUriString” method on german umlaut-domains (e.g. http://www.bücher.de).

I found similar question at https://stackoverflow.com/a/6107682/413531 (taken from http://msdn.microsoft.com/en-us/library/system.uri.aspx at “International Resource Identifier Support”) but the solution is not working for me. My current app.config file looks something like this:

<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="..." type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        <!-- ... some sections in here ... -->
        </sectionGroup>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <!-- ... some sections in here ... -->
        </sectionGroup>
    </configSections>
    <userSettings>
        <!-- ... some settings in here ... -->
    </userSettings>
    <applicationSettings>
        <!-- ... some settings in here ... -->
    </applicationSettings>
</configuration>

when I just add

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

as an other child of at the end, an exception is thrown: ConfigurationErrorsException – {“Das Konfigurationssystem konnte nicht initialisiert werden.”}

So I read further in http://msdn.microsoft.com/en-us/library/system.uri.aspx an came across

IRI and IDN processing in the Uri class can also be controlled using
the System.Configuration.IriParsingElement,
System.Configuration.IdnElement, and System.Configuration.UriSection
configuration setting classes. The
System.Configuration.IriParsingElement setting enables or disables IRI
processing in the Uri class. The System.Configuration.IdnElement
setting enables or disables IDN processing in the Uri class. The
System.Configuration.IriParsingElement setting also indirectly
controls IDN. IRI processing must be enabled for IDN processing to be
possible. If IRI processing is disabled, then IDN processing will be
set to the default setting where the .NET Framework 2.0 behavior is
used for compatibility and IDN names are not used.

Unfortunatly I was not able to find an example for the usage of System.Configuration.IriParsingElement, System.Configuration.IdnElement, and System.Configuration.UriSection. I’ve no clue how these are used…

So basically, my problem comes down to: I want to enable IDN/IRI support in the URI class, but I can’t figure out how to do this. The config-solution is not working for me, so I would like to try it by code, but can’t figure out how. Btw. I would also like to know why the config thing isn’t working 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:52:28+00:00Added an answer on May 28, 2026 at 8:52 pm

    I found a solution – at least for the app.config part. According to http://social.msdn.microsoft.com/Forums/nl-NL/netfxnetcom/thread/56a73dbb-c0d4-4cad-876d-83ad74064393 one has to add an additional line in the app.config if a .Net version lower 4.0 is used:

    <configSections>
      <section name="uri" type="System.Configuration.UriSection, System,
                          Version=2.0.0.0, Culture=neutral,
                          PublicKeyToken=b77a5c561934e089" />
    </configSections>
    

    After adding this line, I could also add

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

    without getting an error. My complete app.config now looks like this:

    <configuration>
        <configSections>
            <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="..." type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        <!-- ... some sections in here ... -->
            </sectionGroup>
            <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <!-- ... some sections in here ... -->
            </sectionGroup>
    
    <!-- ... insert Missing section ... -->
    
            <section name="uri" type="System.Configuration.UriSection, System,
                          Version=2.0.0.0, Culture=neutral,
                          PublicKeyToken=b77a5c561934e089" />
    
        </configSections>
    
    <!-- ... insert URI settings ... -->
    
        <uri>
            <idn enabled="All" />
            <iriParsing enabled="true" />
        </uri>
    
        <userSettings>
        <!-- ... some settings in here ... -->
        </userSettings>
        <applicationSettings>
        <!-- ... some settings in here ... -->
        </applicationSettings>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.