Why do VS2008 spawn one Cassini for each web-site/application when going into debug mode?
Asked Answered
H

3

4

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?

Hatchment answered 24/9, 2008 at 13:23 Comment(0)
H
11

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.

Hix answered 17/4, 2009 at 6:37 Comment(2)
Thank you, I would have never found this!Philomena
This should be marked as the answer. Finally I found what I was looking for.Marasco
B
2

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?).

Basicity answered 12/12, 2008 at 16:19 Comment(0)
G
1

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.

Giantism answered 24/9, 2008 at 13:24 Comment(2)
Actually, what I want is to not have a single one... I don't want it to open any webservers (cassinies) at all.Hatchment
You'll have to connect your web site to your IIS then.Giantism

© 2022 - 2024 — McMap. All rights reserved.