Ok im sitting with this issue kind of stupid but I don\'t know how to google this for the solution.
Lets say i have a database with values inside e.g 1000.00
See Convert.ToDouble(string,CultureInfo)
The locale setting, specifically the regional settings that govern what symbol is used as a decimal point, are influencing the conversion. To avoid that, you need to perform a culture invariant conversion so that the locale setting on your machine does not play a part. For example:
double value = double.Parse(stringValue, CultureInfo.InvariantCulture);
That said, I do wonder why you are storing floating point values as strings in the first place. It's best to convert user input into its natural form at the earliest possible moment, and only convert back to string as late as possible.
This is because of your CultureInfo. Apparently, your PC is using periods for decimal notation, while your server is using commas. if you try to convert one of them using the other method, you get this issue.
Solution: Convert.ToDouble()
has an extra overload which allows you to pass a cultureInfo for conversion. Or you can just save your variable in the database as a float or decimal.