I have an API in Visual Studio 2017, but when I upload it to the server in windows server 2012, it says:
Unable to load type 'System.Threading.AsyncLocal`1' from the assembly 'mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 '.
Chances are your server with Windows 2012 does not have the minimum .Net framework Dlls installed for System.Threading.AsyncLocal (.Net 4.6 and higher). If there hasn't been any changes to your server, it probably only has .Net 4.5 installed.