First, select the "Web.Host", right click and publish
Second, configure publishing options, select "File System", select the directory publishing
Third, click the Publish After configuration, as shown below:
Output tool output Ads
Four, IIS view module contains AspNetCoreModule
If you use ABP Net Core cross-platform, it depends AspNetCoreModule module
When the module is not included AspNetCoreModule, you need to download and install , Download: https://dotnet.microsoft.com/download
Four, IIS in New Site
Description: http://192.168.8.22:1001 access address
Browser, enter the address ( http://192.168.8.22:1001 ) access, automatically jump to http://192.168.8.22:1001/swagger/index.html
Fifth, the emergence of abnormal cross-domain cross-origin
Sixth, modify the configuration appsettings
Open the release directory can be found in more than one profile: appsettings.json appsettings.production.json appsettings.Staging.json
代码读取哪一个appsettings是有环境变量配置的,此时为发布环境,读取的是appsettings.production.json
打开appsettings.production.json修改配置即可
(1)数据库连接:
说明:Server=localhost; Database=PDDb; Trusted_Connection=True;
Trusted_Connection=yes(可信任连接) ,password设不设密码都能访问(安全性低)
"Default": "Server=.; Database=PDDb; User=sa; Password=1;Trusted_Connection=false;"
(2)ServerRootAddress( 步骤四中,配置的地址):
"ServerRootAddress": "http://192.168.8.22:1001/"
七、上一步修改完后并保存后,重新启动
八、重新访问地址http://192.168.8.22:1001 ,此时已经访问正常。