For me it was a fresh NetCore application that was just not loading via IIS. When run standalone it was OK though.
I removed the <aspNetCore
line and then I got a normal error message from IIS saying that NetCoreModule could not be loaded. That module is required to understand this new web.config line.
The error message 0x8007000d
actually says that the web.config is malformed and that error shows up before the error loading module making this error message really crap. (and an unfortunate race condition problem)
I installed the NetCoreSDK and stopped and started IIS (restart didnt work)
The NetCore API started working via IIS as expected.