在Visual Studio(2008)中,我可以作为Web根启动网站调试会话吗?

时间:2023-01-22 01:31:35

I have a website in my solution, let's assume it is in a folder called /Solution/Website1. When I debug it in Visual Studio, it will come up as http://localhost:someport/Website1. I want it to start as http://localhost:someport. Is this possible?

我的解决方案中有一个网站,我们假设它位于名为/ Solution / Website1的文件夹中。当我在Visual Studio中调试它时,它将显示为http:// localhost:someport / Website1。我希望它以http:// localhost:someport开头。这可能吗?

2 个解决方案

#1


If you click on the Website1 Project then go to the Properties Window(F4) you should see a property here for Virtual path try setting that to "/"

如果您单击Website1项目然后转到属性窗口(F4),您应该在此处看到虚拟路径的属性尝试将其设置为“/”

Website Properties http://www.bendewey.com/code/*/WebSiteProperties.png

网站属性http://www.bendewey.com/code/*/WebSiteProperties.png

#2


If you are using Visual Studio 2008:

如果您使用的是Visual Studio 2008:

R-Click on the project heading in the Solution Explorer. Click Properties. Go to the Web tab, there will be a Servers section which will alow you to specify the port.

在解决方案资源管理器中单击项目标题。单击属性。转到Web选项卡,将有一个Servers部分,它将指示您指定端口。

#1


If you click on the Website1 Project then go to the Properties Window(F4) you should see a property here for Virtual path try setting that to "/"

如果您单击Website1项目然后转到属性窗口(F4),您应该在此处看到虚拟路径的属性尝试将其设置为“/”

Website Properties http://www.bendewey.com/code/*/WebSiteProperties.png

网站属性http://www.bendewey.com/code/*/WebSiteProperties.png

#2


If you are using Visual Studio 2008:

如果您使用的是Visual Studio 2008:

R-Click on the project heading in the Solution Explorer. Click Properties. Go to the Web tab, there will be a Servers section which will alow you to specify the port.

在解决方案资源管理器中单击项目标题。单击属性。转到Web选项卡,将有一个Servers部分,它将指示您指定端口。