I wanted to call an HTTP API, so I did what every single developer could think of: used what .NET Framework provides or downloaded a library from NuGet.
After trying both solutions, I found that my script was crashing not because I was doing something wrong, but because it was being blocked by the CFX Server itself (the same snippet worked on a console app).
Now, I know why this might be a good idea on the Client, but on the Server? You end up having to use terrible solutions that can be avoided altogether by just lifting a limitation on the Server itself.
You say that disabling the Task Scheduler should fix it, so technically is limited by something. Also, if it breaks things in the base .NET Framework classes (System.Net.Http.HttpClient, System.Net.HttpWebRequest, System.Net.WebClient and System.Net.WebRequest), it should be disabled by default.
No, it shouldn’t, as that’d break compatibility with older resources that don’t expect to not automatically marshal to the main thread, and it’s not possible to say ‘hey, this resource was first written way after this date, so it makes sense to disable it by default for this resource’.
Not really? ‘limited’ would mean ‘something you can’t change’ which also makes no sense in the first place since this is an open-source project…