I have 2 ASP MVC applicataions sitting on the same server, in different app pools. One is public facing and the other is just for users of the internal network.
They both query the same database and run under the same user profile.
When debugging the apps on my computer, everything is in order, however when running them published to the server, when displaying double
values, the public facing app always uses a comma whereas the private one uses full-stops (as it should).
As far as I know I haven't specifically set any culture settings regarding this, I only have a custom filter set for dates on the private site:
public class CustomDateTimeBinder : IModelBinder
{
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var value = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
CultureInfo culture = new CultureInfo("en-GB"); // dd/MM/yyyy
var date = value.ConvertTo(typeof(DateTime), culture);
return date;
}
}
which is the closest thing I can think of but I don't think this is the cause of the difference.
Where would I start looking to find out what causes this difference? It seems the issue must be on the server, because when debugging from VS on my pc it uses the .
as required.
It seems ridiculous to have to format every single double as suggested here.