Jez
Jez

Reputation: 30003

How to make IIS Express run all websites in a solution?

When using IIS Express to debug web applications in Visual Studio, VS will run all the solution's web applications in IIS Express upon your pressing F5 to debug. However, when you stop debugging, it will actually stop running the "Startup project" website meaning that if you then try to visit it in the browser you will just get a "connection closed".

The only way I've found to get around this behaviour and keep the website running outside of debug mode is if you right-click an aspx or html file and select "View in browser" - this makes VS run all web applications in IIS Express. However it requires you to have such a file in your web application, which you might well not if your application is MVC.

So is there a way to explicitly tell VS to just run all the web applications in IIS Express, allowing you to view them in the browser even when Visual Studio isn't in debug mode, without using the "right-click View in browser" trick?

Upvotes: 0

Views: 1317

Answers (2)

RMH
RMH

Reputation: 837

Under debug you have the option to "start without debugging" (i believe the default shortcut is CTRL+F5) which starts the website but does not start a debugging session.

Keep in mind that if you close VS (or ISSExpress) the application will still stop and any changes in compiled code will require a rebuild.

Upvotes: 1

23nigam
23nigam

Reputation: 621

When you click on stop debugging, VS will kill the issexpress.exe process on which the debugger is attached.

An alternate way is to go to the Debug Menu and Select 'Detach Debugger', which detaches the debugger without killing the issexpress.exe process allowing your websites to still be visible.

Upvotes: 2

Related Questions