visual-studio - 本地网络中 IIS Express 上的主机名无效
问题描述
当我从 Visual Studio 启动 IIS-Express 时,我可以连接到我的网站并且一切正常。我想让我的网站可以从本地网络访问,所以我尝试了以下方法:
以管理员身份启动 Visual Studio(2019 社区版)
更改了:launchSettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:1313/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Skilliam": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:1313/"
}
}
}
应用程序主机配置
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:1313:localhost" />
<binding protocol="http" bindingInformation="*:1313:*" />
</bindings>
</site>
防火墙
在所有这些更改之后,当我尝试从我的网络中的不同设备连接时,我仍然得到“无效的主机名”。
解决方案
推荐阅读
- python - 从缓冲区 C 与 Python 中提取数据。建议?
- laravel-5.2 - 关系一对一的laravel 5.2
- python - 将额外的输入传递给 Keras 深度网络以计算自定义成本函数
- solr - Solr - 按查询中的值顺序对结果进行排序
- html - 如何在寓言中切换显示/隐藏元素?
- javascript - Javascript 使用 Math.random 在 for 循环中生成随机 rgba 值
- node.js - 每次我们向 db 中的特定 id 发出请求时,如何计算查看次数?
- r - 如何查看虚拟变量
- sql - CASE 和 UPIVOT 的区别在于找到跨列的最大日期;ORA-00904 错误信息
- sql - 如果存在这样的行,则仅获取满足条件的行,如果不获取满足另一个条件的行