Running aspnet web site starts on parent directory

2019-08-15 04:22发布

I have some old project written in asp.net web pages. I open project by Open Website option and choosing MyCompany folder. I start a project with debugging. The Asp.NET Development server starts.

Actual: localhost:53669/MyCompany/somepage.aspx

Expected: localhost:53669/somepage.aspx

How can I force the ASP.NET development server to start on MyCompany folder location not on the parent folder location?

1条回答
叼着烟拽天下
2楼-- · 2019-08-15 04:39

What version of Visual Studio are you using? In Visual Studio 2010, you can change it in the project properties

Steps

  • Open the Solution Explorer
  • Right click your project
  • Click Properties Window (not Property Pages)
  • Alter the Virtual path option from /MyCompany to just /

Example so you know you're in the right place

Before

enter image description here

After

enter image description here

查看更多
登录 后发表回答