ASP.Net WebApi STA Mode
问题 This post scratches off WebApi from being able to run in STA mode. But this post is also 2 years old. I've been digging into the newer WebApi2 but can't seem to find a way to make MessageHandlers run in STA mode. So has anyone found a way of running WebApi or WebApi2 in STA mode? 回答1: So it seems that if you want to switch the entire request processing thread to STA mode, you're better off with MVC. However, if your handler does a one off task that doesn't involve switching the entire thread