How do I keep the development web server (Cassini)

2019-02-15 21:01发布

问题:

I'm using Visual Studio 2008 to develop ASP.NET applications. Currently I'm debugging with running on IIS. I would like to switch to the development web server (Cassini) for debugging, so that I can use features like edit and continue. The reason that I'm not, is because the development web server only starts up when you are in debug mode. Is there any way to keep it running all the time, and just have Visual Studio attach to the existing server process like it does with IIS?

回答1:

You can also start your cassini server from the command line which takes alot of pain out of the whole "debug" effort...

Check out a good snippet here on how to do this: https://thoughtjelly.wordpress.com/2009/05/13/launch-cassini-from-the-command-line/



回答2:

Rihan is partially correct...

In your Project Property page, Web tab: Enable Edit and Continue

If checked - The Development server will close when the app (not VS) stops.

If unchecked - Development server keeps running



回答3:

Once started, the built-in web server continues executing even when you stop debugging, as long as your VS2008 project is still open. Just start up the debugger when you want to start debugging again. I typically have another browser window open and interact with the built-in web server from there instead of the browser window that it opens so I can keep working with the application in the same state even after turning off the debugger (which closes the opened browser window).

I'm running VS2008 on Windows XP SP3.



回答4:

The simplest way I have found to acheive that is by launching the debugger as normal. Then in Visual Studio goto the Debug menu, and select detach all. It detaches from the Cassini web engine, but it does not shut it down, as it does when stopping debugging.

I am quite sure you are know that there is command line swithces that you can you use to launch the cassini engine, but my guess is you are looking for something slightly easier.

Detaching does not close the browser window that visual studio launched, and if you do close that spesific web window then it will stop debugging.

I am running VS 2008 SP1 on Vista 64x SP1 without IIS.

Hope it helps Rihan Meij



回答5:

I have 3 web sites, with Single sign on between each site so I need to start all 3 with attach to process. However, there was no process to attach the debugger to, and whenever I started a project with F5 then stop it, the visual studio web server closed.

The Enable Edit and Continue option didn't change anything.

So to start the web server and keep it running so that you can attach the web project to the process, I simply did a "view in Browser" (ctrl+shift+W). This started the server process but not the project nor the debugger. I could then attach to process easily.



回答6:

In Visual Studio 2015 you do this by going to Tools > Options > Debugging > General and unchecking the "Enable Edit and Continue" option: