【发布时间】:2018-06-23 15:06:47
【问题描述】:
我基本上是 ASP.NET Core 的新手。我创建了一个 Web API 模板并设置了一个控制器,然后在 wwwroot 下手动创建了以下目录结构:
wwwroot/
css/
site.css
js/
site.js
index.html
当我按下 F5 时,我想在浏览器中启动 index.html。但是,我无法弄清楚如何做到这一点。这是我的launchSettings.json:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:63123/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "index.html",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
当我在 Chrome 中运行“IIS Express”命令时,我得到“没有为网址找到网页:http://localhost:63123/index.html”。为什么会这样?
我的应用程序的完整源代码在这里:https://github.com/jamesqo/Decaf/tree/webapp-2/Decaf.WebApp。
【问题讨论】:
标签: asp.net iis asp.net-core visual-studio-2017 .net-core