I have a small webapi service, which works under Visual Studio but doesn't work under IIS. I did the next:
When I try access folder with my app (like
http://localhost/example/) I receive
500.19 error with code
0x8007000d. I read this error can happen if
Web.config has wrong XML options. I use default
Web.config file (
ApplicationHost.config is not used by me) which VS generate, and I don't understand what can be bad in it. Here's my
<?xml version="1.0" encoding="utf-8"?> <configuration> <location path="." inheritInChildApplications="false"> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers> <aspNetCore processPath="dotnet" arguments=".\Service.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" /> </system.webServer> </location> </configuration>
Lex Li wrote an excellent article: https://blog.lextudio.com/the-horrible-story-of-publishing-net-core-web-apps-for-beginners-6121662dd8c4, which described issues with publishing .NET Core Web Apps.
In my case, I hadn't installed the ASP.NET Core Hosting Bundle. A simple solution which is hard to be found because it is difficult to understand what should be searched for.
I ran into the exact same issue and in addition to the marked correct answer, this is what worked for me:
I installed the ASP.NET Core Hosting Bundle and was still receiving the same error.
Repairing the installation resolved my issue.
"If the Hosting Bundle is installed before IIS, the bundle installation must be repaired. Run the Hosting Bundle installer again after installing IIS. If the Hosting Bundle is installed after installing the 64-bit (x64) version of .NET Core, SDKs might appear to be missing (No .NET Core SDKs were detected). To resolve the problem, see Troubleshoot ASP.NET Core projects." - Install the .NET Core Hosting Bundle
User contributions licensed under CC BY-SA 3.0