未编译发布的asp.net core Mvc 部署源代码到IIS
1 .先把整个项目文件夹部署到IIS 上面
启动项目发现报错
缺少发布的配置文件 下面 在根目录 添加一个配置文件 web.config 并配置好里面的路径
arguments=".\bin\Debug\netcoreapp2.1\netcore.dll"
再次启动发现又报错 HTTP Error 500.0 - ANCM In-Process Handler Load Failure
解决方法1:
应用池高级配置 - 启动32位应用程序 - 设置为True
方法2:
web.config
<?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="dotnet" arguments=".\bin\Debug\netcoreapp2.1\netcore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>
删除 hostingModel="InProcess"
再次回收应用程序池 启动