配置IIS模块
ASP.NET Core Module载地址:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?tabs=aspnetcore2x
注意:位置
![](https://yqfile.alicdn.com/img_38e49b76cc04b47a0e5ca5f86f11a5be.png?x-oss-process=image/resize,w_1400/format,webp)
安装后再IIS管理器---模块页面会出现aspnetcoremodule
![](https://yqfile.alicdn.com/img_f035946d3e07b35c9dd0272a7fd533c3.png?x-oss-process=image/resize,w_1400/format,webp)
新建网站
注意端口号:有些朋友的电脑端口80被占用一直显示小姐姐诶----- 可换成其他端口
![](https://yqfile.alicdn.com/img_cfeb3d4188d6f95363bafaa29d599462.png?x-oss-process=image/resize,w_1400/format,webp)
修改应用池
![](https://yqfile.alicdn.com/img_5b558035d1a797b056d347e2bcfd1678.png?x-oss-process=image/resize,w_1400/format,webp)
网站发布
控制台方式
dotnet publish发布到项目文件的bin/debug文件夹下
dotnet publish -o D:\ProjectDemo\aspnetcoredemo发布到指定文件夹下
![](https://yqfile.alicdn.com/img_c0796f1cb3bb3c8d810c75dab62aaa64.png?x-oss-process=image/resize,w_1400/format,webp)
浏览之前iis配置的网址:
![](https://yqfile.alicdn.com/img_57b1f33648b55cc45f04fbc18e5229f3.png?x-oss-process=image/resize,w_1400/format,webp)
VS发布网站
![](https://yqfile.alicdn.com/img_6dc8889480325fd5f8be099beed250d0.png?x-oss-process=image/resize,w_1400/format,webp)
发布成功,访问网址!!!OK 没毛病!!!