简体   繁体   English

IIS Express端口编号

[英]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.

相关问题 如何使用端口号(IIS Express)设置Facebook App Domains本地主机 - How to setup Facebook App Domains localhost with port number (IIS Express) 如何在 C# 中从 IIS Express 获取应用程序端口 - How to get app port from IIS Express in C# 无法启动 IIS Express Web 服务器 - 端口“80”正在使用中 - Unable to launch IIS Express Web server - Port '80' is in use 如何更改站点的 IIS Express 端口 - How can I change IIS Express port for a site 无法启动IIS Express Web服务器端口80 - Unable to launch the IIS express web server port 80 is in use 如何在端口号 53135 中使用 IIS Express 运行 HTTPS - How to run HTTPS with IIS Express in port number 53135 IIS Express“指定的端口正在使用中”Visual Studio 2015 - IIS Express 'The specified port is in use' Visual Studio 2015 如何找出 IIS Express 实例正在使用的端口? - How to figure out what IIS Express instance is using a port? 是否可以在Visual Studio 2015的其他端口中发布asp.net Web API? IIS不是IIS Express - Is it possible to publish asp.net web api in a different port in Visual Studio 2015 ? IIS not IIS Express ASP.NET MVC Web应用程序未在IIS Express 10.0中定义的端口上运行 - asp.net mvc web app is not running on defined port in IIS express 10.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM