1- On visual studio 2019 and .net core 2.2, created a default web application and didn't change any thing on my project, just publish it.
2- Installed the same version of the run-time from this link and put publish folder on the IIS (Windows 10 X64 enterprise), port 5000.
3- On the IIS changed CLR version to "No Managed Code" and brows website but I got this error message:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data
for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\? \C:\WebApplication1\WebApplication1\bin\Release\netcoreapp2.2\publish\web.config
Requested URL http://localhost:5000/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
After looking for this error code "Error Code 0x8007000d" on this link I do not know what's the problem. Should I set a config or what?
Edited: This application works fine on visual studio
Install .NET Core 2.2 Runtime & Hosting Bundle for Windows and simply refresh your page. The error is caused because AspNetCoreModule is not installed in your PC.
You can read more about ASP.NET Core Module here.
To Host .net core app to IIS, Below are the checklist which I managed to resolve
"net stop was /y"
then "net start w3svc"
error
Application 'C:\TestCoreApp\' failed to start. Exception message:
Could not find dotnet.exe at 'C:\TestCoreApp\dotnet.exe' or
using the system PATH environment variable. Check that
a valid path to dotnet is on the PATH and
the bitness of dotnet matches the bitness of the IIS worker process.
in web config change processPath="C:\Program Files\dotnet\dotnet.exe" from processPath="dotnet.exe" or add path to environment variable
cross check below in config.xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\Webpi.test.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
error :
Unable to load 'C:\Program Files\dotnet\host\fxr\3.1.0\hostfxr.dll'. This might be caused by a bitness mismatch between IIS application pool and published application.
solution
check whether your application pool has "No Managed code" in .net clr version enter code here`
User contributions licensed under CC BY-SA 3.0