Can we have same port in single websites?

Posted by Jitendrasoft09 under ASP.NET on 7/11/2020 | Points: 10 | Views : 1073 | Status : [Member] [MVP] | Replies : 1
I would like to understand how the ports are setup even though the one IP address has a different domain, can you please make an understand how ports are make a uniqueness. Answers will be appreciated.

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Ishan7 on: 12/3/2020 [Member] Starter | Points: 25

Up
0
Down
The bind settings are stored in the IIS configuration file <sites> section of the IIS config file
C:\Windows\System32\inetsrv\config\applicationHost.config


In our case, this section contains the following data:

<sites>
<site name="Default Web Site" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
</site>
<site name="TestSite" id="2" serverAutoStart="true">
<application path="/" applicationPool="TestSite">
<virtualDirectory path="/" physicalPath="C:\inetpub\TestSite" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:TestSite" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%SystemDrive%\inetpub\logs\LogFiles" />
<traceFailedRequestsLogging directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles" />
</siteDefaults>
<applicationDefaults applicationPool="DefaultAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>


For more information read this blog:
http://woshub.com/run-multiple-websites-on-the-same-port-and-ip-address-on-iis/#:~:text=The%20same%20IIS%20server%20can,port%20(e.%20g.%2C%208080).

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response