[英]IIS Express Port Numbering
Web Application projects and WCF projects have a project URL setting in Visual Studio as shown below: Web应用程序项目和WCF项目在Visual Studio中具有项目URL设置,如下所示:
This makes sense to me as I realise these projects run on IIS Express. 当我意识到这些项目在IIS Express上运行时,这对我来说很有意义。 The port seems to be different for each project.
每个项目的端口似乎都不同。 Why is this?
为什么是这样? The reason I ask is because the port is always consistent in IIS (unless you add another binding).
我问的原因是因为IIS中的端口始终是一致的(除非您添加其他绑定)。
If I install Visual Studio on another PC, then will the ports change? 如果我在另一台PC上安装Visual Studio,端口会更改吗?
The IIS Express Project Url is saved in csproj project file. IIS Express项目网址保存在csproj项目文件中。 So when you run the project on another PC, the port will stay the same.
因此,当您在另一台PC上运行项目时,端口将保持不变。
<Project>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties>
<WebProjectProperties>
<IISUrl>http://localhost:50380/</IISUrl>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.