views:

436

answers:

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.

+1  A: 

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
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
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
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
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