Minimal web API gives HTTP 500.19 error on IIS
I am trying to get a .NET 8 minimal web api up and running under IIS on Windows 11. Based on a blog post, I created a new app pool with
A quick search suggested this was because my web api uses
But after publishing it grows a little and looks like this:
Many hits on another search tell me the solution here is to remove invalid elements from the config file, but how must I know what is valid or not.
No managed code as the CLR version[1] and assigned it to the Default Web Site. Everything else is default. Then, from Rider, I use publish to folder to publish my web api project to C:\inetpub\wwwroot. When I choose Manage website=>Browse in IIS manager I get an HTTP 500.19 error:A quick search suggested this was because my web api uses
appsettings.json, so I added a web.config file the project, but that made no difference. The web.config in my source is almost empty:But after publishing it grows a little and looks like this:
Many hits on another search tell me the solution here is to remove invalid elements from the config file, but how must I know what is valid or not.