views:

378

answers:

3

I have quite a big solution here with a lot of different web applications and sites, around 10-15 of them.

When I attach VS2008 to any process (most likely Nunit.exe or something similar) I get one Cassini process per website/application in the solution. Is there a quick way to get rid of this behaviour in VS or do I have to connect them to the IIS?

+1  A: 

From what I know the mini web server that comes with Visual Studio is only capable of hosting one web app at a time. For what you want you really have to go with IIS.

cruizer
Actually, what I want is to not have a single one... I don't want it to open any webservers (cassinies) at all.
You'll have to connect your web site to your IIS then.
cruizer
+2  A: 

Just as multiple apps cannot have the same URL, you need multiple instances of Cassini to expose the apps (i.e. projects) locally. This more closely mimics the way the code will be ultimately deployed. You won't take the output from multiple projects and stick them in a single folder on the production app server, so VS doesn't do it either. Additionally, spawning a new process for each project gives them their own resources, which keeps them from stepping on each other during debugging.

VS 2008 exposes a project level setting that prevents Cassini from starting unless the project is explicitly debugged. Setting this would keep your sites from spinning up if all you want to do is run your unit tests (because those are in a separate project, right?).

Kiff
+5  A: 

I think what you want to do is set the "Always start when debugging" property to "false" for each of your website projects. Just click the project in the solution explorer, hit F4, and it's the first property in the list.

This property is annoying because even when you attach a debugger to IIS (i.e. you're not even building the solution), the little servers start automatically.

womp
Thank you, I would have never found this!
CJCraft.com