欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使.NET6在開發(fā)時(shí)支持IIS

 更新時(shí)間:2021年12月21日 11:36:03   作者:known  
這篇文章介紹了使.NET6在開發(fā)時(shí)支持IIS的方法,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

操作步驟

1.下載dotnet-hosting-6.0.0-rc.1.21452.15-win.exe并安裝,成功后檢查IIS模塊中是否有AspNetCoreModuleV2

2.安裝VS時(shí)選擇“開發(fā)時(shí)IIS支持”

3.在IIS中創(chuàng)建站點(diǎn),目錄指向開發(fā)項(xiàng)目wwwroot的上級(jí)目錄,應(yīng)用程序池默認(rèn)與站點(diǎn)名稱相同

4.將剛新建站點(diǎn)的應(yīng)用程序池的.NET CLR版本改成無托管代碼

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>

到此這篇關(guān)于使.NET6在開發(fā)時(shí)支持IIS的文章就介紹到這了。希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

您可能感興趣的文章:

相關(guān)文章

最新評(píng)論