'IIS 8.5, .NET 6 WebApi Controller does not work(500) while wwwroot files does
I have WebApi .Net 6 added to IIS, but controllers doesn't work.
I turned on static files to be sure if the problem in Runtimes whatever, but images work by the link, so the app is working(?). In Task Manager i can see running tasks of the app.
I tried to turn on logging in web.config, no logs.
I installed Serilog expecting it will write logs as i see in console, but nothing was written, i guess it's because IIS runs .dll instead of .exe.
I tried manually create files on each step of the app, nothing was created....
So at this point i am stuck completely. Don't understand what the problem is.
When i run .exe of my app on the server, everything works by localhost link.
Release files created by the command: dotnet publish -c release
UPDATE
The problem was that i missed '/' in a file path...
You can turn on app to show errors via web.config:

Solution 1:[1]
See the answer in the main post in Update.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | John wantstoknow |








