網(wǎng)站首頁(yè) 編程語(yǔ)言 正文
操作步驟
1.下載dotnet-hosting-6.0.0-rc.1.21452.15-win.exe并安裝,成功后檢查IIS模塊中是否有AspNetCoreModuleV2
2.安裝VS時(shí)選擇“開(kāi)發(fā)時(shí)IIS支持”
3.在IIS中創(chuàng)建站點(diǎn),目錄指向開(kāi)發(fā)項(xiàng)目wwwroot的上級(jí)目錄,應(yīng)用程序池默認(rèn)與站點(diǎn)名稱相同
4.將剛新建站點(diǎn)的應(yīng)用程序池的.NET CLR版本改成無(wú)托管代碼
5.在項(xiàng)目啟動(dòng)配置文件中添加配置(也可在項(xiàng)目屬性調(diào)試中配置)
{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iis": { "applicationUrl": "http://xxx.xxxx.com", "sslPort": 0 } }, "profiles": { "IIS": { "commandName": "IIS", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } }
6.在項(xiàng)目中添加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="bin\Debug\net6.0\Web.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" arguments=""> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> </environmentVariables> </aspNetCore> </system.webServer> </location> </configuration>
原文鏈接:https://www.cnblogs.com/known/p/9307647.html
相關(guān)推薦
- 2022-07-17 一起詳細(xì)聊聊C#中的Visitor模式_C#教程
- 2022-11-10 Android?Jetpack組件支持庫(kù)DataBinding與ViewModel與LiveData
- 2022-04-20 .NET?6新特性試用Timer類之PeriodicTimer?_ASP.NET
- 2022-10-07 numpy拼接矩陣的實(shí)現(xiàn)_python
- 2022-03-06 SQLServer批量插入數(shù)據(jù)的三種方式及性能對(duì)比_C#教程
- 2022-10-01 python實(shí)現(xiàn)圖像增強(qiáng)算法_python
- 2022-04-09 windows中查看進(jìn)程(netstat)和殺掉進(jìn)程(taskkill)的幾個(gè)命令
- 2022-10-31 Kotlin集合List?Set?Map使用介紹詳解_Android
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過(guò)濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支