.Net Core开发学习(六) ——IIS部署


文章使用之前的.Net Core MVC应用作为部署项目,但该教程可适用于所有.Net Core项目。

IIS托管

发布项目(文件夹)
.Net Core开发学习(六) ——IIS部署

.Net Core开发学习(六) ——IIS部署
.Net Core开发学习(六) ——IIS部署
发布完成后,找到 项目路径\bin\Release\netcoreapp3.1\publish,可以看到发布的文件。

Ok,接下来配置IIS


配置IIS

首先要下载一个环境模块Windows Hosting Bundle,该模块用于IIS托管.Net Core项目,我这里使用的是.Net Core 3.1版本,可自行选择项目对应的版本。

下载连接

.Net Core 3.1 Hosting Bundle
.Net Core 3.0 Hosting Bundle
.Net Core 2.2 Hosting Bundle
.Net Core 2.1 Hosting Bundle
.Net Core 2.0 Hosting Bundle
.Net Core 1.1 Hosting Bundle
.Net Core 1.0 Hosting Bundle

下载完成后安装,过程很简单,就不再赘述。


打开IIS,新建网站

.Net Core开发学习(六) ——IIS部署

.Net Core开发学习(六) ——IIS部署
添加后设置托管
.Net Core开发学习(六) ——IIS部署
设置为无托管代码,因为.NetCore使用的是Kestrel作为服务器,当前使用的是IIS反向代理Kestrel。
.Net Core开发学习(六) ——IIS部署

运行

.Net Core开发学习(六) ——IIS部署
.Net Core开发学习(六) ——IIS部署
OK,部署成功

相关文章:

  • 2021-09-21
  • 2022-12-23
  • 2022-01-02
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-15
  • 2022-01-07
  • 2022-03-08
  • 2021-09-04
  • 2021-07-22
  • 2021-12-01
  • 2021-06-14
相关资源
相似解决方案