I'm using visual studio 2012 in the first days when I want to stop application in IDE, application was still running on IIS Express, I could browse and work with running application, but now I can't. IIS Immediately shutting-down application if I press stop button. Since I remember I didn't make any changes in setting. How should I do that running same as first days.
-
1Try 'view in browser' instead of 'play'. Did you change default browser? IE is automatically shut down on stop, Chrome is not. – Emanuele Greco Jan 17 '13 at 10:31
-
No, I'm using FF, but sometimes I need to debug the application. – Saber Amani Jan 17 '13 at 10:36
-
I think this is something related to IIS Express. – Saber Amani Jan 17 '13 at 10:37
-
1Instead of clicking the stop button, you can also use Detach All in the Debug menu. – jessehouwing Jan 17 '13 at 12:58
-
@jessehouwing Thanks for your reply, but what exactly Detach All is doing ? – Saber Amani Jan 17 '13 at 16:45
-
1It detached the debugger from the processes being debugged, but does not kill the processes in the progress. – jessehouwing Jan 17 '13 at 16:58
-
@jessehouwing I wish I could mark this comment as answer :) :P, this is not my answer but a tricky way to go around this situation. – Saber Amani Jan 17 '13 at 17:06
-
You could upvote the comment itself. I've also transferred my comment to an answer. – jessehouwing Jan 17 '13 at 17:43
5 Answers
I recently faced a similar situation when suddenly my IIS Express stopped right after I stopped debugging. This happened after I turned on "Enable Edit and Continue". So if you disable this you will see that IIS Express stays running even after debugging is stopped.
Right click your project > click Properties > select the 'Web' tab on the left > uncheck the Enable Edit and Continue
checkbox.
-
3
-
52This Works !! Right click your project > click Properties > select the 'Web' tab on the left > uncheck the 'Enable Edit and Continue' checkbox. – nv.snow Oct 19 '13 at 21:07
-
7It Works. In Visual studio 2013 Open "Tools-> Options" , Select in the tree "Debugging->Edit and Continue" and uncheck the box "Enable Edit and Continue". – Renzo Ciot Dec 05 '13 at 15:21
-
3you can read about this feature in more details here: http://blogs.msdn.com/b/webdev/archive/2013/07/11/enable-edit-and-continue-debugging-option-is-now-on-by-default-for-new-web-applications-in-vs2013-preview.aspx – gor Jan 21 '14 at 16:46
-
this answer is not wholly correct, and is misleading people apparently.. the underline concept here is whether the stop button terminates the IIS Express Managed Process or simply detaches from it.. Theoretically, you can enable the edit and continue (EAC) feature and have the stop button detach (not terminate) by default.. @gor's article reference in his comment indicates that.. – Brett Caswell Sep 25 '14 at 19:18
-
I had an IIS Express error running Visual Studio 2013 via Parallels on Mac. Running VS as Administrator solved the problem. – fhilton Nov 27 '14 at 19:43
-
5No, this is a bad solution - see the correct solution, posted by @jessehouwing, below. – Josh M. Jan 30 '15 at 14:32
-
Thanks Abhi. Did the trick "Right click your project > click Properties > select the 'Web' tab on the left > uncheck the Enable Edit and Continue checkbox." – Krish Dec 15 '15 at 06:07
-
This does not work for me using Visual Studio 2015 Community. Instead I opted for the Detach All solution mentioned by @giammin (including changing Ctrl-F5 to Detach instead of Stop) and that seems to be working. – Aron Boyette Apr 30 '16 at 13:56
In VS2010 and VS2012, the edit and continue option is disabled by default when creating a new web application project. In VS2013 it is turned on by default.
You can find this option on the Web tab in the web project’s properties window.
With “Enable Edit and Continue” on, the VS debugger starts your web application in IIS Express. When you stop debugging, IIS Express is closed too. With this behavior, you will see the IIS Express system tray shows up during debugging and gone after debugging. This behavior is the same as in VS2012 when the Enable Edit and Continue option is turned on.
If you don’t need "Edit and Continue" functionality during development and would like IIS Express to stay after a debugging session, you can simply turn the Enable Edit and Continue option off.
If you want to use "Edit and Continue" or you are developing an Asp.net 5 site (ASP.NET 5 projects don't have an Edit and Continue checkbox in project properties) you have to use the "Detech all" command to stop debugging.
The debugger will detach from the iis process without closing it.
Clearly "Edit and Continue" feature will not work until you start debugging again.

- 18,620
- 8
- 71
- 89
Instead of hitting the (X) STOP
button, you can use the Detach all
menu item in the Debug menu. The major difference is that the stop button will terminate any process that is currently being debugged, while Detach All will disconnect the debugger from the processes, but will not terminate them.
The normal IIS worker process would also be terminated, but since it used to be running as a service, it will also automatically start up again and thus you could continue to use it without having to restart the process through |> Debug
or |> Start without debugging
.
Screenshot for Reference

- 26,437
- 24
- 119
- 200

- 106,458
- 22
- 256
- 341
-
3this is actually closer to the real answer.. The 'EDIT AND CONTINUE' option is a feature.. Attaching and Detaching the debugging tracer to a listening process is the underline concept of discussion here, and whether clicking stop terminates that listening process or simply detaches from it.. which of course you can reattach to as well. – Brett Caswell Sep 25 '14 at 18:49
-
@jcmcbeth it does indeed work for IIS Express.. I couldn't possibly see it not working... IIS Express Processes are just that, their own seperate processes.. your VS debugger is starting up the process and attaching to it.. but that Process doesn't depend on your attached debugger to run anymore than your application or webserver require a visitor/user-agent/client to run in proc – Brett Caswell Sep 25 '14 at 19:30
-
@Brett, my comment was based on personal experience. Take it or leave it. – Joel McBeth Nov 13 '14 at 19:40
-
1@jcmcbeth, that's a weird thing to say on a Q&A site when you're talking about feature support and settings. This is not a take it or leave it scenerio; You stated that it doesn't **appear** to work with IIS Express. It does. – Brett Caswell Nov 14 '14 at 14:53
-
@jessehouwing: Yes, this is the proper way to do it unless a "do not stop underlying process when terminating a debug session" option exists. That would be ideal, really. Added a screenshot to your answer. Maybe that will help draw more attention to it, instead of the *incorrect accepted answer* above. – Josh M. Jan 30 '15 at 14:30
-
1The "Enable Edit and Continue" checkbox is not present in the VS 2015 RC for ASP.NET 5 projects, so that's the way to go if you want to use IIS Express with these. – Tomek May 19 '15 at 14:04
-
this seem to be the right answer, since you are answering "how to avoid vs to shutdown IIS" cheers mate! – genuinefafa Aug 27 '15 at 21:07
-
If you do this, do you start accumulating processes as you debug multiple times? When does a detached IIS Express process exit? – jpmc26 Sep 09 '15 at 00:25
-
-
7This is the answer to how VS 2015 Update 2 has changed IIS Behavior with the removal of Edit and Continue from the Project web tab. – Robharrisaz Apr 05 '16 at 21:47
It seems like since the release of Visual Studio 2015 Update 2 the accepted solution no longer works.
The easiest solution I've found so far is to start the project by selecting "Start Without Debugging" from the Debug menu.

- 5,270
- 2
- 40
- 54
-
1
-
Damn, I just ran into this problem and [posted question](http://stackoverflow.com/questions/37263470/after-installing-vs2015-update-2-i-can-no-longer-view-website-unless-i-go-in-deb) on this. Is there any known workaround to solve this - other than rebinding your shortcuts to Start without Debugging and Detach instead of Stop? – nikib3ro May 16 '16 at 22:19
-
1They say they're fixing it in the next update, in the mean time another trick you can use is to hit ctrl+F5 to start the site without debugging: https://connect.microsoft.com/VisualStudio/feedback/details/2562576/edit-continue-cant-be-disabled-which-causes-iis-express-to-stop-when-the-debugger-is-stopped – mattmanser Jun 29 '16 at 12:36
This is probably best categorized as another workaround, but it works for me.
I generally start the project for the first time with the "View in Browser" context menu (or CTRL-Shift-W).
From then on, anything that requires debugging, I usually attach to the new existing iisexpress process. While mousing thru context menues would make this a non-starter, it is nearly as quick as F5 with the following keystrokes:
- Shift-F6 to build the current project or Ctrl-Shift-B to build the entire solution (this is only required if you have made changes but I thought I should mention it since F5 already does this).
Ctrl-Alt-P opens the attach to process dialog
typing "iis" will then bring you down to the iisexpress process
- hit enter and you're attached
If you have more than one iisexpress running, the last one started will generally appear at the top of the list. Another option is to shift-select and attach to all of them.
This has a number of advantages IMO. First and foremost, it doesn't terminate the process. Second, the browser window isn't closed when you stop debugging. It cracks me up when I see a developer repeat 7 steps to get to reproducing a bug, when all he needs to do is hit F5 in an existing browser window to just repost once the debugger is connected. Last, I have to do this already when attaching to nunit, so I get a more consistent experience.

- 7,059
- 2
- 41
- 56
-
Thanks for "Ctrl-Alt-P opens the attach to process dialog" forgott about it – Tomas Hesse Sep 24 '20 at 07:01