You are likely using a different culture between the two machines.
For example, the server is using the US culture which expects the format MM/dd/yyyy
so your parsing works.
You local machine may be using a culture such as UK which expects the format dd/MM/yyyy
and as there is no month 21 it fails.
You can specify the culture explicitly if you know it's always going to be the same:
Convert.ToDateTime("09/21/2017", new System.Globalization.CultureInfo("en-US"));
It may also work with an invariant culture:
Convert.ToDateTime("09/21/2017", System.Globalization.CultureInfo.InvariantCulture);
You may also use ParseExact
to specify the desired format:
DateTime.ParseExact("09/21/2017", "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);