简体   繁体   中英

How to make ASP.NET development server run on port 80?

我正在构建这个ASP.NET网站项目,当我构建时(Ctrl-F5)Visual Studio 2008使用端口4730上的ASP.NET开发服务器运行网站。有没有办法让它在端口80上运行?

项目属性> Web>选择特定端口并填写80

我相信这是在项目设置中完成的,您可以将参数定义到Cassini或让它在IIS上运行。

You can also use command line options to start the webserver on any port you want. Of course , the condition is that the port is available.

http://azamsharp.com/Posts/22_Programmatically_Starting_Web_Server_to_Execute_WatiN_Tests.aspx

右键单击解决方案资源管理器中的项目,然后选择属性,然后指定端口“80”和虚拟路径,例如:“/ mayApp”

Here are the steps.

1.) If you already have IIS on your workstation then chances are high that it must be running on port 80. If so is the case with you, then you must first release the port 80 by stopping IIS website service. Refer to the screenshot below.

alt text http://ruchitsurati.net/files/iis_stop.png

2.) Now you need to goto Properties' window of your website project in Visual Studio. And set the settings as it look in the screenshot below. And you're done! Hit F5 and see it's running on port 80.

alt text http://ruchitsurati.net/files/port80_prop.png

Thanks.

Select the website in your solution explorer and open the properties window. Change Use dynamic ports to false and change the port number to 80. You might have to click away from the site after you change the bool to false and then click back to have the port field become available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM