欢迎光临
我们一直在努力

.NetCore:部署IIS

 

1、环境安装

 

2、部署iis

和原来的net部署一样,唯一区别是将托管模式修改为无托管

 

另外可配置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=".\API.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" /> </system.webServer> </location> </configuration>

 

 

 

扩展:

.netcore的托管模式主要分2种:进程内托管和进程外托管

在 IIS 工作进程 (w3wp.exe) 内托管 ASP.NET Core 应用,称为进程内托管模型
将 Web 请求转发到运行 Kestrel 服务器的后端 ASP.NET Core 应用,称为进程外托管模型

 

通过修改项目文件配置如下,修改为进程内托管,默认没有或者设置为OutOfProcess为进程外托管模式

 

 

赞(0)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:.NetCore:部署IIS
文章链接:https://www.jmwz.net/1910.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
分享到: 更多 (0)