WebApi的LaunchSettings文件

在.NETwebApi当中有一个配置文件夹LaunchSettings.json;主要用于定义如何启动和调试应用程序。以下是各部分的详细解释:

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,//设置为 false 表示在IIS和IIS Express中不启用Windows身份验证
    "anonymousAuthentication": true,//设置为 true 表示在IIS和IIS Express中启用匿名身份验证
    "iisExpress": {
      "applicationUrl": "http://localhost:17897",//应用程序在IIS Express中运行时使用的URL
      "sslPort": 44371
    }
  },
  "profiles": {
    "http": {
      "commandName": "Project",// 这个配置使用“Project”模式启动,通常指直接通过项目启动
      "dotnetRunMessages": true,//设置为 true,在运行时显示构建消息
      "launchBrowser": true,//设置为 true,启动时自动打开浏览器
      "launchUrl": "weatherforecast",//浏览器启动时打开的网址后缀,这里是 weatherforecast
      "applicationUrl": "http://localhost:5173",//应用程序的访问URL
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"//设置环境变量,这里设置 ASPNETCORE_ENVIRONMENT 为 Development,表示开发环境。
      }
    },
    "https": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "applicationUrl": "https://localhost:7077;http://localhost:5173",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",//使用 IISExpress 模式启动,通常指在IIS Express环境中启动
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值