简体   繁体   English

在调试ASP.NET时无法设置起始页

[英]Setting start page when debugging ASP.NET not working

I am using Visual Studio 2012. 我正在使用Visual Studio 2012。

In my solution explorer I would normally right click on a ASPX file and click on " Set as Start Page ". 在我的解决方案资源管理器中,我通常会右键单击一个ASPX文件,然后单击“ 设置为起始页 ”。 When running the website, it would then start with that page. 在运行网站时,它将从该页面开始。

All of a sudden, no matter what page I select to start, running the project opens http://localhost:13713/Default (which doesn't exist). 突然之间,无论我选择启动哪个页面,运行项目都会打开http://localhost:13713/Default (不存在)。 Even if I manually type in the path to the ASPX page during the debug session, it'll just return back to http://localhost:13713/Default . 即使在调试会话期间手动输入ASPX页面的路径,它也只会返回到http://localhost:13713/Default

Does anyone know why this is happening? 有人知道为什么会这样吗?

I'm not sure of the underlying problem, but one thing to try is to right-click on the root website project file in the Solution Explorer, select the "Property Pages" option then "Start Options" and specify your "default.aspx" (or whatever page you want) as the Specific Page option. 我不确定潜在的问题,但是要尝试的一件事是在解决方案资源管理器中右键单击根网站项目文件,选择“属性页”选项,然后选择“启动选项”,然后指定“ default.aspx” ”(或所需的任何页面)作为“特定页面”选项。

Hope this helps. 希望这可以帮助。

Not sure what happened here, but the problem went away after restarting. 不知道这里发生了什么,但是重新启动后问题消失了。 The magical restart! 神奇的重启!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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