I made a simple POC in AspNet Core 2.1.2 a few days ago without any issue. I was able to run it either from IIS Express & local IIS (hosted or started/debugged via Visual Studio).
I updated the project to the latest AspNet Core 2.1.4 yesterday and cannot seem to run any AspNet Core application in my local IIS now.
I created a new project (without https) to be sure the migration wasn't the issue.
About my environment :
- Visual Studio 2017 (15.8.4)
- IIS 10.0.17134.1
- Latest packages downloaded from here (even if already included in the latest VS release) : https://www.microsoft.com/net/download/dotnet-core/2.1 Downloads
Test case :
- Created an new "ASP.NET Core Web Application" -> API -> No authentication & no HTTPS
- NetCore version 2.1
Once the solution is created, running it directly into IIS Express works. Selecting the other profile named with the application name also works (starts the console and the service correctly)
I then want to host it in my local IIS :
- Add a new website with a custom port (5555) and the physical path set to the solution folder (where sits the bin/obj/program.cs/...)
- Once created, browsing the site throws me a "Configuration error" : normal, there is no web.config available.
- I then right-clic on my project in VS, select "Properties" and "Debug"
- I Create a new profile as such : Profile
- I create a web.config file containing the following (and will be transformed as I change running profile) : Web.config
- The project is not "correctly setup" (correctly as my previous POCs with AspNet Core 2.1.2)
Issues :
- If I try to browse the website through IIS, an error 500 occurs
- If I try to debug the solution with the "IIS" profile, an error occurs as such : Startup error
- All the HttpFailure*.html files are empty (0kb)
- There is no error in the event viewer
- There is no error in the IIS log files when enabled
- There is no log file when the parameter stdoutLogEnabled is set to true (except when launched via a profile different than the IIS one, but still, no error)
Tests
I tried to :
- Restart my computer
- Start VS as administrator
- Give full permission on the file system where applicable to "Everyone" and the IIS pool user selected
IIS Express & "console" profile still works.
EDIT1 : I also uninstalled everything and tried to revert to 2.1.2 without success (still with the latest VS)