如何让Windows服务器托管的MVC应用公开化?

问题描述 投票:0回答:1

我创建了一个简单的MVC应用程序,并托管在IIS上的Windows Server 2016上,它在服务器上运行得很好,像这样。

enter image description here

现在我想在我的本地网络上访问它,用相同的IP:148.72.xxx.xxx:xx,但我无法这样做。谁能帮帮我,我在这里错过了什么。

enter image description here

另外:当把端口改为80时,它可以工作,但在82端口上不能工作,为什么?

asp.net-mvc iis hosting windows-server-2016
1个回答
1
投票

我想这是因为你没有把IIS绑定的端口号从默认的80改成82,或者你忘记在windows feirewall中允许82端口。端口号不是由你的MVC应用程序控制的,而是由IIS绑定的主机头控制的。

enter image description here

以下是关于如何在windows防火墙中创建一个入站规则的链接。

https:/docs.microsoft.comen-uswindowssecuritythreat-protectionwindows-firewallcreate-inbound-port-rule。

© www.soinside.com 2019 - 2024. All rights reserved.