I m试图使IDN/IRI能够支持URI的班级,因为我需要“Uri.IsWellFormedUriString”方法,使用german umlaut-domains(例如www.bücher.de)。
我在https://stackoverflow.com/a/6107682/4135上发现了类似问题。 (摘自http://msdn.microsoft.com/en-us/library/system.uri.aspx, at “International Resource Identifier Support” ,但解决办法并非针对我。 我的目前情况是这样:
<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>
我刚才补充的是:
<uri>
<idn enabled="All" />
<iriParsing enabled="true" />
</uri>
作为最后的另外一名儿童,一个例外是: Configuration ErrorsException -{“Das Konfigurationssystem konnte nicht initialisiert werden>
因此,我在http://msdn.microsoft.com/en-us/library/system.uri.aspx。 一、导 言
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.
不幸的是,我找不到使用系统的例子。 配置。 IriParsing Element, System. 配置。 IdnElement, and System.Configuration. Uri Section. 一、如何使用这些工具......
因此,我的问题基本上在于:我想让国际志愿人员联合会/国际志愿人员联合会支持国际志愿人员协会,但我可以说明如何这样做。 结局不是为我工作,因此,我想通过法典加以尝试,但可以说明如何。 Btw。 我也想知道,这件事情为什么不奏效?