如何更改站点的 IIS Express 端口 [英] How can I change IIS Express port for a site

查看:22
本文介绍了如何更改站点的 IIS Express 端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在从 Visual Studio 调试时更改我的网站运行的端口号.我使用的是 Visual Studio 2012,我的项目使用的是 ASP.NET MVC 4,我想更改端口.随机端口或固定任何人都会工作只是想更改端口.

I want to change the port number on which my website runs while debugging from Visual Studio. I am using Visual Studio 2012, and I am using ASP.NET MVC 4 for my projects I want to change the port. Random port or fixed anyone will work just want to change the port.

推荐答案

为使用 IIS Express 的 Web 应用程序项目指定端口

To specify a port for a Web application project that uses IIS Express

  1. 在解决方案资源管理器中,右键单击应用程序的名称,然后选择属性.单击Web"选项卡.

  1. In Solution Explorer, right-click the name of the application and then select Properties. Click the Web tab.

在服务器部分的使用本地 IIS Web 服务器下,在项目 URL 框中更改端口号.

In the Servers section, under Use Local IIS Web server, in the Project URL box change the port number.

在项目 URL"框的右侧,单击创建虚拟目录",然后单击确定".

To the right of the Project URL box, click Create Virtual Directory, and then click OK.

在文件"菜单中,单击保存所选项目".

In the File menu, click Save Selected Items.

要验证更改,请按 CTRL+F5 运行项目.新的端口号出现在浏览器的地址栏中.

To verify the change, press CTRL+F5 to run the project. The new port number appears in the address bar of the browser.

来自 如何:为开发服务器指定端口 (archive.org 备份 此处).

From How to: Specify a Port for the Development Server (archive.org backup here).

这篇关于如何更改站点的 IIS Express 端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆