As a developer of an HttpModule that is used in over 150 countries, I want to make sure I’m doing the right thing by making all web.config data culture-invariant. This means any date/time values, floating-point, or integers specified in Web.config should be parsed with the invariant culture (generic english).
Is this the correct convention to follow? Extensive googling didn’t turn up an answer.
I recommend that you use the invariant culture for all configuration settings in Web.config, because that is the convention followed by ASP.NET. Your users will probably find it confusing to have to specify invariant data in certain places and localized data in other places.
(ASP.NET relies on the functionality in
System.Configurationto parse configuration data. The internalConfigurationProperty.ConvertFromStringmethod callsTypeConverter.ConvertFromInvariantStringto convert a string to a typed value. You too can useSystem.Configuration; see the MSDN Library documentation.)