Search code examples
asp.net-mvciishostingwindows-server-2016

How to make Windows Server Hosted MVC app public


I have created a simple MVC Application and hosted on Windows Server 2016 on IIS, its running fine on server, like this:

enter image description here

Now i want to access it on my local network, with the same ip: 148.72.xxx.xxx:xx, but i am unable to do so. Can anybody help me what i am missing here.

enter image description here

Also: it worked when change port to 80 but not working on port 82 why so?


Solution

  • I think that's because either you didn't change your port number in IIS binding from default 80 to 82 or you forgot to allow 82 port in your windows feirewall. The port number is not controlled by your MVC application but IIS binding host header.

    enter image description here

    This is the link about how to create a inbound rule in windows firewall

    https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-firewall/create-an-inbound-port-rule