日期:2023-07-09  浏览次数:66 次

参考教程:http://learn.microsoft.com/zh-cn/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-7.0&tabs=visual-studio

 

1、必须下载的IIS(就算安装VS2022环境也要安装这个才可以):

http://download.visualstudio.microsoft.com/download/pr/68e88ddb-bf01-48fc-abd0-3e1503212deb/98d1e15dcccf7cd76915a1772c8e901e/dotnet-hosting-7.0.8-win.exe

介绍 http://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-7.0.8-windows-hosting-bundle-installer

 

2、配置打包项目、IIS创建网站

3、配置连接池为无托管-经典模式

4、给Users权限,就可以正常跑起来了,因为打包发布时,VS2022会自动生成V2的模块在web.config中了。