Closed MihaMarkic closed 4 years ago
Shouldn't it work with DI as well?
MVC 5.2.7 controllers must have a parameterless constructor. This is by design.
Thank you for your feedback. We're closing this issue as the behaviour discussed is by design.
@dougbu Why does it need to create a controller instance anyway? Can just reflect over it?
I have enabled OPTIONS verb for supporting preflight CORS checks, like this:
It seems working, but only if controller in question has a parameterless constructor (see the error message below). Shouldn't it work with DI as well?