asp.net - 为什么我的 ASP.NET 项目不在启动项目中,而是在开发服务器上运行?

标签 asp.net visual-studio debugging webdev.webserver

我有一个 Visual Studio 2008 解决方案,其中包括一个用 c# 编写的 asp.net 托管的远程处理项目。该解决方案还包含其他 c# 项目和 c++ 项目。

在调试我的c#客户端和asp.net服务器的交互时,调试的很棒。我可以从字面上进入服务器调用并退出。但是,有时我需要将调试重点放在独立的可执行文件上 没有asp.net项目 .

我的问题是,将启动项目设置为asp.net 项目以外的其他项目后,不会阻止asp.net 项目在开发服务器(和系统托盘)中启动。它本身似乎并不是“调试”,但它正在运行并在我不希望它的情况下耗尽资源。

我已经检查并重新检查了启动项目设置。他们牢牢地处于“关闭”位置。关于为什么会发生这种情况和/或如何防止这种情况的任何想法?有没有其他人经历过这种情况?

Solution Notes: Chalk this one up to the "oh that's where that is!" phenomenon in Visual Studio. This setting isn't on the ASP.NET project properties page (right-click on project in solution explorer and choose "properties"), and isn't on the startup projects UI. Instead it is on the "regular" properties page when the project is selected in the solution explorer. i.e. ensure the properties page is visible (View->Properties Window) and then click on the ASP.NET project in solution explorer. The top option is "Always Start when Debugging" which, when set to false, solved the problem.

最佳答案

阻止开发服务器启动。

  • 单击解决方案资源管理器中的 ASP.net 项目。
  • 在属性窗口中将“调试时始终启动”设置为 false
  • 关于asp.net - 为什么我的 ASP.NET 项目不在启动项目中,而是在开发服务器上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/482012/

    相关文章:

    visual-studio - Visual Studio : Custom code highlighting based on regex

    c# - 无法将 dll 程序集引用到 Visual Studio Code 项目

    c# - 如何在计算模拟器中同时调试多个 Azure 角色?

    debugging - 是否有适用于 IE6 的类似 Firebug 的工具?

    c# - 使用 iTextSharp 获取复选框的导出值

    c# - 指定的消息不存在。错误代码 :MessageNotFound Prod-WorkerError Context

    c# - 我可以将 Kentico CMS 中的整个购物车传递给 paypal 吗?

    c# - obout TreeView 从 2.0 更新到 3.5

    .net - 警告 MSB8004 : Output Directory does not end with a trailing slash.

    .net - 为什么在调试时 Word 会卡住?