1

Using VS2008 on my local dev machine, when I run my asp.net Web Application project, it starts up a session of Asp.Net Development Server when I use F5 to run the app in debug mode. It all works fine and I can run my app for testing and such. Then, when I stop the running debugging instance of my app (by closing the IE window with the X close button, or by clicking the square Stop Debugging button in the VS IDE), the app stops and I return to the VS IDE, but it also closes down the Development Server session, and then, after I make a few edits to my code and want to run it again, it takes forever to launch up the Development Server again and serve up the first page of my very simple app.

Is it normal for the session of Asp.Net Development Server to completely shut down like this each time?

I only have 1 project in my solution, and it uses ADO.NET Typed DataSets and OLEDB adapters, and basic asp: controls in the aspx web form. Overall, it is a very small app.

I hate waiting 20-30 seconds each time I want to run my app just to see one tiny little code change.

MattSlay
  • 9,115
  • 5
  • 43
  • 52
  • Similar to another posting: http://stackoverflow.com/questions/256401/how-do-i-keep-the-development-web-server-cassini-running-in-visual-studio-2008 – David Andres Sep 12 '09 at 02:52

2 Answers2

10

I was also facing same problem, but in my case "Edit And Continue" setting was a culprit. Thanks for posting this.

AYK
  • 3,312
  • 1
  • 17
  • 30
  • 1
    Confirmed. Before the change, whenever I stopped debugging, my development web server would stop. After unchecking **Enable Edit and Continue** under the project's Properties, Web tab, the web server stayed running after ending debug. – Aron Boyette Apr 30 '15 at 14:47
1

If you don't need to debug every time, you can actually just open the URL outside of pressing F5 (press F5 once, copy the url, stop debugging, open it in a new browser). This way you can make any changes you want, recompile, and see it immediately. But as I said, it means you're not debugging. You don't always need to debug though.

A secondary option, is to run against IIS, and only attach to the process as needed.

Noon Silk
  • 54,084
  • 6
  • 88
  • 105
  • 4
    Oddly, I went into the Properties of the Project, on the Web tab, under Debuggers, I noticed that I had the checkboxes for Asp.Net, Native Code, and SQL Server checked. I unchecked Native and SQL, and left Asp.Net (which includes all managed code I too I assume), and now when I run and stop, it DOES leaves the Development Server alive between runs. Who knew? Not sure why I had those other checked anyway. NOT running in debug mode every time is probably a wise thing. I'm kind of a newbie, so that's just a habit I've developed, but indeed it's not always necessary now that I think about it. – MattSlay Sep 12 '09 at 03:05
  • 1
    I was just going to answer with "you must have changed something because I think it stays open by default". Glad to know what it was. – womp Sep 12 '09 at 03:06
  • Why would adding those other debuggers options cause it to stop each time? I also turned on the Enable Edit and Continue option, as mentioned in the similar posted that David commented about, and even that made it stop each time. Still not sure I understand it, but hey, it's working now. – MattSlay Sep 12 '09 at 03:15
  • MattSlay, your note about what debugging options to run is the one that fixed this for me. IMO that should be a separate answer to this question - I would vote it up, since it resolved the issue in my situation. – cori Aug 24 '10 at 14:53
  • 4
    Had the same issue. I read @MattSlay comment and I noticed, that I don't have Native Code nor SQL Server checked, but I had "Edit and Continue checked. Unchecking that solved the problem, ASP.NET Development Server stays running after I stop debugging. – mco Nov 07 '12 at 09:48
  • 1
    Also, a note. If you have IntelliTrace on with the option "IntelliTrace events and call information" visual studio will shut down the server every time you stop debugging. – JonathanTech Aug 05 '13 at 19:18